Trigger once but for each instance?

This forum is currently in read-only mode.
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hello. I'm working on a game where the characters rely on state machines to change their actions and animations. I have a character change to his jump animation and set the frame number to 4, then resume the animation. Once while true. Another character who uses the same objects but different variables controls differently and works out just fine. The only thing is, when they both try to jump, only one of the instances changes to the jump animation and resumes. The other changes to the animation but is stuck on the frame is is set to and remains that way until the other one lands. Is there any way to set an action to run once but for each object instance?

  • Hello StreakThundrstrm. I'm not quite sure I understand you problem. Sorry.    :(

    I think you should post a .cap, maybe that could help us understand your problem a little better? :)

  • --character-is in air(or whatever your condition is that supposed to trigger once while true)

    ----Is Private Variable ('DoneOnce') equals 0

    --------Set Animation "jump"

    --------Set Animation Frame to 4

    --------Resume Animation

    --------Set Private Variable ('DoneOnce') to 1

    --[Inverted]character-is in air(or whatever....)

    ----Set Private Variable ('DoneOnce') to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I understand how that would work, thanks. Is there any way to make it a bit more global? The characters have tons of animations and actions. Right now I have a way of choosing each character seperately and it works globally rather than locally except for these animation changes. I'll try something else and see what I can come up with. Thank you for your help. I'll post a reply if I find anything or need more help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)