Using Comment Event to speed boost

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
73
Reaction score
49
First Language
Danish
Primarily Uses
RMMV
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?




Thanks!
 

GuiltySlug

Villager
Member
Joined
Apr 16, 2017
Messages
11
Reaction score
21
First Language
English
Primarily Uses
RMMV
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.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,418
Reaction score
669
First Language
Portuguese - Br
Primarily Uses
RMMV
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 ^^
 

Kristina

Veteran
Veteran
Joined
Jun 22, 2019
Messages
73
Reaction score
49
First Language
Danish
Primarily Uses
RMMV
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 ^^
Thanks, didn't think about that :)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,701
Reaction score
1,147
First Language
EN
Primarily Uses
RMMV
@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. :kaoback:

If you want to avoid the built-in Timer, I'd suggest using a variable and shorter wait times, e.g.
Code:
◆Comment:1800 frame wait time (1800/60 = 30 seconds)
◆Control Variables:#0001 frameWait = 1800
◆Control Switches:#0001 Timer Active = ON
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. :kaothx:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

The only upside of this remote semester was the plenty of funny photoshop material those facecams provided. Not that I would do that. Ever.
New skit is up for grid battle system. Less tactics battle engine looking battle systems, more final fantasy/breath of fire looking battle systems.

Dororo wrote on Tsukihime's profile.
For the grid battle system: a function to check if another actor is in a given range - to trigger combo actions or benefit of passive aura/morale ranges.
Uuuh I cannot find any good RPG to play
Gimme some free RPG recommendations plz
I need to consume it
I'm in a need of excitement caused by doing literally nothing on my laptop and then thinking I did something useful and then realising that I didnt and crying internally

Forum statistics

Threads
100,512
Messages
976,666
Members
132,080
Latest member
nwr
Top