Using Comment Event to speed boost

Hello!
I'm not sure what I do wrong here, so could use some fresh eyes.

The idea is simple.
When the player drinks a cup of coffee (item) they get a speed boost that last 30 seconds.

So I thought making a comment event or two to be specific and link it to the item would do the trick, but I just can't get it to work.

Can anyone see what I'm doing wrong here?

Spoiler: Coffee Item
5kPMtzV.png

Spoiler: Common Event 1
d8RzmR2.png

Spoiler: Comment Event 2
VpSiT0p.png

Thanks!
In your part 2 event, you have the speed boost turning off if the timer is greater than or equal to 0:00. Try changing that to < and see what happens, but I'm not well-versed enough in how common events work to know if that's the entire problem.
If you don't want to show a timer for that, you can just make this with common events:
[EDIT] OPS, instead of "Wait 30 frames", you can put two times:
Wait 900 frames
Wait 900 frames
This will be equal to 30 seconds ^^
Spoiler: Without timer
tkXJfTg.png
3oQs6Yw.png
In your part 2 event, you have the speed boost turning off if the timer is greater than or equal to 0:00. Try changing that to < and see what happens, but I'm not well-versed enough in how common events work to know if that's the entire problem.

It worked! I knew it was something really small that was the issue, haha. Thanks!

If you don't want to show a timer for that, you can just make this with common events:
[EDIT] OPS, instead of "Wait 30 frames", you can put two times:
Wait 900 frames
Wait 900 frames
This will be equal to 30 seconds ^^
Spoiler: Without timer
tkXJfTg.png
3oQs6Yw.png

Thanks, didn't think about that 🙂
@Eliaquim: depends a bit on the scenario, but I would not recommend this in general, since parallel events reset on map change, i.e. the parallel event will restart from the top whenever the player moves to another map. 👋

If you want to avoid the built-in Timer, I'd suggest using a variable and shorter wait times, e.g.
Spoiler: Activate timer event
Code:
◆Comment:1800 frame wait time (1800/60 = 30 seconds)
◆Control Variables:#0001 frameWait = 1800
◆Control Switches:#0001 Timer Active = ON
Spoiler: Parallel timer event
Code:
◆Comment:Check value
◆If:frameWait ≤ 0
  ◆Comment:End "timer"
  ◆Text:None, Window, Bottom
  :    :Time's up!
  ◆Control Switches:#0001 Timer Active = OFF
  ◆
:Else
  ◆Comment:-6 every 6 frames (0.1 seconds).
  ◆Control Variables:#0001 frameWait -= 6
  ◆Wait:6 frames
  ◆
:End
This reduces the possible error to (in this case) 6 frames per map change. Since the wait time is after the check, it also helps ensure that the total duration can never be more than 1800 frames. 🙏

Original thread: https://forums.rpgmakerweb.com/threads/using-comment-event-to-speed-boost.110492/