I need help trying to figure this out. I want to make an event that is triggered by taking a certain number of steps. For example, having a map in a loop, and an event is triggered when you've walked 100 steps. I found the "control variable > game data > steps" thing, but I cant seem to figure out how to set it up. Help, por favor?
step triggered
● ARCHIVED · READ-ONLY
-
-
One event.
Page 1 - triggered by parallel process or autorun if you want to start counting the moment you enter the map, otherwise a regular trigger if you want the player to do something to start the counting.
Get the number of steps into a variable
Add the number of steps you want them to walk into the same variable
(so if they've already walked 500, add 100 to it to make it 600)
Turn on a self switch
Page 2 - parallel process, conditioned by that self switch
Wait 5 frames ('cause you don't need to check 60 times a second, and it avoids lag)
Get the number of steps into a DIFFERENT variable
Do a conditional branch - if the NEW variable is equal to or greater than the OLD variable (that you set on the previous page)
In the "true" part of the branch, do whatever you want to happen when they reach that number of steps, then turn on a different self switch
Leave out the "false" part of the branch, or just leave it empty
Page 3 - conditioned by the second self switch, leave all other things on the page with their default values
(this just stops the event counting steps, and prevents the actions happening again) -
Perfect! thank you so much!
-
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.