isoplants's Recent Forum Activity

  • I'm currently working on a game where I want to dynamically assign the control schemes to the players in the order they are used.

    It already works like a charm with all the keyboard control schemes, but with controllers, I've run into a big problem.

    For example: When I use [Gamepad].GamepadID(0), it refers to the first gamepad. So far, so good.

    But the moment a gamepad is used that, in Windows' order (as witnessed through the Game Controllers settings), comes before the gamepad that was previously the Gamepad with the ID 0, Construct now refers to that as Gamepad 0, pushing the other one forward to Gamepad 1.

    My question is, is there a way to either stop Construct from changing the order or to reliably be able to keep referring to the same gamepad?

    Thanks in advance.

  • Thank you, ramones. I was tinkering around just minutes ago and found that it worked if I used the direct object type.

    You confirmed it, though.

  • In the file I provided, for demonstration purposes, it only places two pelvises (one for each character) rather than all of the body parts.

    The problem is that the function assembleCharacter for some reason takes all the instances of pelvis and places them on one hitbox, rather than just taking the one specified through the parameter and placing it on the corresponding hitbox.

  • Sorry for the bump, but I now have enough reputation to post the link to the file. See the post above.

    Thank you in advance.

  • Here's how I worked it out. Hope I understood you correctly.

    https://www.dropbox.com/s/ghg4q4aoxyn9i9s/pauseBtn.capx?dl=0

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I was making a game that has a complex animation system and everything was going well, until I implemented a second player character.

    My system works like this:

    I only place the character's hitbox on the layout and at the start of the layout, the event sheet places all the body parts onto it.

    Then, every tick, the position and angle of the body parts is updated. I don't use pins because the pins started lagging really badly once I daisy-chained more than one part.

    Because I wanted my game to be dynamic and scalable, I used functions to implement the placing and the updating of each character's parts.

    I have those 2 functions (stemming from one Function object, does that make a difference?), createCharacter and assembleCharacter, which are called with either 0 or 1 as their parameter, depending on which player they should affect.

    The way that works is as follows:

    The hitbox has an instance variable playerNumber that corresponds to the instance variables owner in the body parts.

    For some reason, assembleCharacter places the pelvis (and thus subsequent parts) on the last called hitbox, even though I tell it to discriminate based on playerNumber and owner.

    Here is the file:

    https://www.dropbox.com/s/d5vf9ltlkstqrte/mortifyingProblem.capx?dl=0

    I've removed almost everything that is not related to the problem. There may still be some residual behaviors and instance variables that shouldn't affect anything though.

    I've also set the event sheet up so it is observable what is happening. In the first 4 seconds, the assembleCharacter function is alternately called with 0 and 1 as its parameter each second, after that both are called every tick.

    I've been working on fixing this for close to 24 hours. I would be very thankful for any help.

    Edit: I think I have enough reputation to post the file now.

isoplants's avatar

isoplants

Member since 25 Jul, 2015

None one is following isoplants yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies