Issues With Timers

Status
Not open for further replies.

Fangzarie

Veteran
Veteran
Joined
Apr 5, 2018
Messages
43
Reaction score
5
First Language
English
Primarily Uses
RMMV
So I've been trying to get into working with timers recently but I can't seem to get them to work. I either have one or two problems. Either the timers do not start or show up at all or the timer does not stop despite whatever conditional branch I have used. I have once tried setting up an event with switches in a common event set to parallel, one being "trap timer on" that starts the timer and the other "trap timer off" that stops the timer. I have even tried having a second parallel event running ready to stop the timer under a conditional branch but still no luck. I am unsure if it is a plugin that makes my timers not even show up or if I am formatting my events wrong? Can someone please help me out?

The event I am trying to accomplish is simple, or so I thought it was simple. I want to make an event that is triggered via player touch. When the player steps on the tile it will display a message and slow the player character down for a determined amount of time. After the time has stopped the players speed will return to normal.

I included two pictures of what I have currently done with the event. This is on an empty map and the only other event present is the player starting position.
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,501
Reaction score
12,044
First Language
English
Primarily Uses
RMMV
Looking at the event as you have it, you set the timer to 30 seconds, then immediately check if it's 30 seconds or less and stop the timer. So the effect will not happen at all.

Is this a button the player can keep pressing, and each time they press it, it will cause the same thing to happen?

If so, delete the If Timer ... test and everything inside it, and put that on the second page. Add a Wait 2 Frames above it all (not inside the condition), change the condition to test for 0 instead of 30, and set the page to Parallel Process. Instead of turning the self switch ON there, turn it OFF. Then go back to the first page, where you set the timer, and also turn the self switch ON.

So it'll be something like this:
Code:
PAGE 1:

Change Speed to 2
Set Timer to 30 seconds
Turn on self switch A


PAGE 2:

(conditioned by self switch A, set to Parallel Process)

Wait 2 Frames
If Timer <= 0 then
  Stop Timer
  Change Speed to 4
  Turn off self switch A
End
 

Fangzarie

Veteran
Veteran
Joined
Apr 5, 2018
Messages
43
Reaction score
5
First Language
English
Primarily Uses
RMMV
Looking at the event as you have it, you set the timer to 30 seconds, then immediately check if it's 30 seconds or less and stop the timer. So the effect will not happen at all.

Is this a button the player can keep pressing, and each time they press it, it will cause the same thing to happen?

If so, delete the If Timer ... test and everything inside it, and put that on the second page. Add a Wait 2 Frames above it all (not inside the condition), change the condition to test for 0 instead of 30, and set the page to Parallel Process. Instead of turning the self switch ON there, turn it OFF. Then go back to the first page, where you set the timer, and also turn the self switch ON.
@Shaz you're an absolute life saver I swear! I don't know how you did it but that seems to have worked perfectly! I think what I was getting mixed up on was the fact that I was trying to put the entire event on one page because I think I'd heard somewhere that if you put a timer on a parallel it will keep resetting itself. Plus the whole 30 sends check was absolutely wrong as well. This was a huge aspect of my game because the trap tiles do many things like poison characters or add a burn status for a short time.

Either way you solved my problem super quick so thanks a ton! This question is closed for me, thanks again!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,776
First Language
German
Primarily Uses
RMMV
I think I'd heard somewhere that if you put a timer on a parallel it will keep resetting itself.
That is correct as well - you just mixed up two different things:
The start of a timer and the check for a timer.

If you put the start for a timer on parallel, it will keep restarting and resetting itself.
But the check for a timer usually (not always) needs to be repeated because you have to wait until the timer is done.
There are a few exceptions to this but the check for a timer is mostly done with a parallel process.

That is why you have to split timing control into two parts, start and end can't be checked in the same event structure.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,501
Reaction score
12,044
First Language
English
Primarily Uses
RMMV
If your issue is resolved, just report your first post and say so, and the mods will lock the thread for you :) It's faster doing it that way than waiting/hoping for them to see your last post.
 

Fangzarie

Veteran
Veteran
Joined
Apr 5, 2018
Messages
43
Reaction score
5
First Language
English
Primarily Uses
RMMV
@Andar right I'll be sure to keep that in mind.

@Shaz Thanks again and also I did not know that, thanks for telling me. I'll report it right away.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,050
Reaction score
4,261
First Language
Dutch
Primarily Uses
RMXP

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.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

Fekken kill me. I unknowingly swapped out two important events's codes and saved the game to test it. I'm just doing this for fun and the fun has now been replaced with excruciating torture.
Is this how game developers feel all the time?

EDIT:
WAIT HOLY S***
MY LAST POST ASKING FOR HELP ON AN EVENT ACTUALLY SAVED IT
OH MY GOD
Coffee + Silk Coconut Milk + Splenda Zero = Not ..... awful :/ .
I was making a cutscene where Hero's dad got killed by the dragon but when he lose its say game over and send you to the tittle screen. How can remove game over for that cutscene
My new RPG Maker music pack, Emotional: Redemption, is now in progress and will be coming to RPG Maker soon. It is an album that focuses on emotional themes including the darker forms of sorrow and despair. Below is a demo of a composition from the album.

Please watch out for your hands when handling chests! XD Did this a few days ago, it was fun to animate

Forum statistics

Threads
94,445
Messages
920,975
Members
124,257
Latest member
Zookx1
Top