I'm trying to make an item that changes its effects after a certain number of steps. The problem is that if I Control Variables : # = Steps, it counts all the steps made during the game. Here's what I would need to make my items work:
1. Resetting the Step number;
2. Have a different counter for each item.
Is there a way to do it without plugins or scripting? If there's such plugin or script, what is it?
Thanks!
When the item is used, store the current steps into a variable.
When you later check the count, use a different variable for the then-current count, and substract the first variable from the second with an additional control variable command. What remains is the difference, the number of steps since activation
I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.
1) when tea is started, control variable "tea step start" = current steps
2) when you want to check, or in a parallel process common event with a wait(10) at the end:
2a) control variable "tempcheck" = current steps
2b) control variable "tempcheck" substract "tea step start"
2c) conditional branch variable "tempcheck" <=50
2d) - do whatever you want depending on condition true or else
2e) wait(10) - if it is inside a parallel process
2a loads a new step number in every cycle, so 2b will just substract once from that number.
the wait 10 is the command wait for 10 frames, because otherwise the parallel process would run every frame and that only produces lag.
Please post a screenshot of your events so far, then I can check where you did something wrong if it doesn't work.
of course - you need to turn off the event when you get the first boiled water - that's part of the same sequence that changes the item numbers inside the conditional branch.
What's the best way to do it? Considering that I want the player to be able to do it again, is it better to turn off the switch or add something on the end of the if?
you need to turn off the switch 6 - there is no alternative unless you want your game to lag.
And when the player starts the sequence again, that is where you both set the waterboil variable to the current steps and turn on the switch after that.