Main Menu

Need to trigger a parallel event every time my player takes a step.

Started by Pl0x, January 25, 2009, 07:48:33 PM

0 Members and 1 Guest are viewing this topic.

Pl0x

How would I go about doing this, i'm trying to get the event to trigger every time my character takes a step.

modern algebra

Quote from: Pl0x on January 25, 2009, 07:48:33 PM
How would I go about doing this, i'm trying to get the event to trigger every time my character takes a step.

Well, you could set variables to Player X and Player Y, then you could check them agains Last Player X and Last Player Y. So a parallel process common event like this:

Control Variables: [XXX: Player X] = [Player]'s X
Control Variables: [YYY: Player Y] = [Player]'s Y
Conditional Branch [XXX:Player X] != [ZZZ: Last Player X]
  Jump to Label: Player Moves
Else
  Conditional Branch [YYY:Player Y] != [AAA: Last Player Y]
    Label: Player Moves
    Control Variables: [ZZZ: Last Player X] = Variable: [XXX: Player X]
    Control Variables: [AAA: Last Player Y] = Variable: [YYY: Player Y]
    # What you want to happen when player moves
  Branch END
Branch END
Wait: 4 frames



There might be an easier way to do it, of course, but that is what pops to mind.