Nothing wrong with that, that I can see. Where are you resetting the variable back to 0? What's the rest of the event? Have you checked what the variable is set to after a little bit of dashing - is it increasing at all? Is your movement route waiting until it completes before executing the next command?
You can't do += 1 inside the script call. You'd have to do $gameVariables.setValue(32, $gameVariables.value(32) + 1). However, I don't think that's the issue. It's more likely the Control Variables isn't being run at all, or you have another event that's changing the variable as well. You could temporarily add a Show Text command after the Control Variables that just contains \v[32] to repeatedly show what the variable contains. At least then you'd know that the variable is actually incrementing. I'd change the 120 to a much lower number though, 'cause you don't want to have to dismiss the text box 120 times to test the condition. Maybe just change it to 10 or something.
Hi! I'm not sure if I understand correctly.
But, try to use in the first conditional branch instead of "= 120" put ">= 120".
[is front clear] is NOT a script command, so that part is where the entire sequence breaks as well.
and as Shaz said above we need to see the rest of the event, the parts you cut off from the screenshot and where you reset the variable (if you don't reset the variable to zero, the entire sequence will only work once)
oh - can we please see the ENTIRE event window, and not just a cropped part? The issue might be somewhere else.
What plugins are you using? I didn't even pay any attention to those script commands. It may be that the variable is working just fine, but your script calls are wrong and are never evaluating to true. Please post links to the plugins.
What IS happening? Is the event moving right up to the player? Adding 1 to a variable every frame would make the event move for 2 seconds before the variable reaches 120. Maybe there isn't 2 seconds worth of moving to be done?
Thanks.
I found the issue! It would recover his ability if counter=120, but if it's bigger, it won't do anything 😀 So I just set it to counter>=120 and now it works perfectly fine 🙂
okay - something is ONLY going to happen with this event if the JMW.checkDist(7,2) script call returns true on the exact frame that the variable reaches 120.
Why are you doing both tests? You want them to run for 2 seconds, or you want them to run a certain distance - pick one and go with that. If checkDist returns true on frame 119 or frame 121, the rest of the commands will never be run.
what script? I've never seen a script that uses syntax like that. And you can't use a plugin command inside a script call.
So you're sure the problem is resolved? You're now able to see that whole event play all the way through with the little change you made?
If so, you can report your first post and let the mods know you have a solution, and they'll lock the thread for you. But don't do that unless you've seen the whole thing play out properly.