The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Pl0x on January 25, 2009, 07:48:33 PM

Title: Need to trigger a parallel event every time my player takes a step.
Post by: 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.
Title: Re: Need to trigger a parallel event every time my player takes a step.
Post by: modern algebra on January 25, 2009, 08:33:37 PM
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.