Struggling with timer.... :/

Status
Not open for further replies.

Dieucra

Villager
Member
Joined
Jun 4, 2015
Messages
20
Reaction score
0
First Language
Spanish
Primarily Uses
So, I'm trying to pull this event..., where the lady gives you an apple for free, ok. done

Now i want her to tell me if i want another or not, ok done.

But if i say yes, i want that after "x" time she is able to give another apple, so i used a timer....

and she will tell me "come later" until the timer reaches 0 and gives me the option again to say if i want another or not.

But the timer doesnt stop, it stucks in 0:00 and she is stuck in "come later" message.... I wonder what im doing wrong, I have actually been thinking of these for days....

I actually once managed that the timer stop and gives me again the option, but I couldnt talk to her in the meantime, the "come later" message wasnt showing up... 



 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
The timer itself does not signal anything.


You need a conditional branch to check if the timer has reached zero or not


Additionally, you cannot use self switch conditions that way: only one page can be active, and if several conditions are true that will be the highest page number.


After self-switch A was turned on, the event was stuck on page 4 because nothing on page 4 (the only active page) controls A to off. The control A= off on page 2 will never be processed, after page 4 has become active.
 
Last edited by a moderator:

Vox Novus

Knight of Whispers
Veteran
Joined
Mar 18, 2013
Messages
3,293
Reaction score
2,473
First Language
English
Primarily Uses
N/A
I'm not sure but I don't think you can use labels to jump to previous event pages like you are trying to do between pages 3 and 2.

If I were doing this I would have triggered the timer via a parallel process event controlled by a switch then in the parallel process event in a conditional branch have it turn a switch on that changes the event page to a new page (also triggered by parallel process) when the timer reaches zero. On the new page have it stop the timer and use a self switch to switch to a blank event page.

You can use the switch used to get from the first event page of the parallel process to the second to go to a new event page for the elderly woman giving the apples. Hope that makes sense.
 

Dieucra

Villager
Member
Joined
Jun 4, 2015
Messages
20
Reaction score
0
First Language
Spanish
Primarily Uses
The timer itself does not signal anything.

You need a conditional branch to check if the timer has reached zero or not

Additionally, you cannot use self switch conditions that way: only one page can be active, and if several conditions are true that will be the highest page number.

After self-switch A was turned on, the event was stuck on page 4 because nothing on page 4 (the only active page) controls A to off. The control A= off on page 2 will never be processed, after page 4 has become active.
I'm not sure but I don't think you can use labels to jump to previous event pages like you are trying to do between pages 3 and 2.

If I were doing this I would have triggered the timer via a parallel process event controlled by a switch then in the parallel process event in a conditional branch have it turn a switch on that changes the event page to a new page (also triggered by parallel process) when the timer reaches zero. On the new page have it stop the timer and use a self switch to switch to a blank event page.

You can use the switch used to get from the first event page of the parallel process to the second to go to a new event page for the elderly woman giving the apples. Hope that makes sense.
Ok, after some thought i managed to solve it! 

Thnx for the tips :)







But the timer wont stop until i reach the map where the old lady is, unless I add the stop timer event to each map (Dont mind the Turn Off switch A, forgot to take it out)

Is there a way to apply this event (the stop timer one) to other maps without adding this event to each map in the game? I tried using Common Events, but it didnt worked...

Also, for future reference....is there a way to  hide the timer?
 
Last edited by a moderator:

Kuro DCupu

Trust me, I'm a veteran RMer
Veteran
Joined
Jul 6, 2014
Messages
480
Reaction score
1,467
First Language
Indonesia
Primarily Uses
RMMV
You can't hide the timer unless you tweak it via script editor. But no, I don't recommend you to use timer because this is not its actual use.

You want it invisible, so why don't you use variable instead? By using parallel process via common event activated by switch, you can drop the variable value by one each 60 frames (1 second) and a variable condition which toggling another switch on when the variable reach 0 and off when variable is greater than 0.
 

Dieucra

Villager
Member
Joined
Jun 4, 2015
Messages
20
Reaction score
0
First Language
Spanish
Primarily Uses
You can't hide the timer unless you tweak it via script editor. But no, I don't recommend you to use timer because this is not its actual use.

You want it invisible, so why don't you use variable instead? By using parallel process via common event activated by switch, you can drop the variable value by one each 60 frames (1 second) and a variable condition which toggling another switch on when the variable reach 0 and off when variable is greater than 0.
Oh, well I just wanted to know if the timer could be hide, "just to know" :p

I'm planning to use timer in other things, this is just for learning purposes :)

thnx anyway
 

Corrupted Ralph

The World Breaker
Veteran
Joined
May 24, 2015
Messages
197
Reaction score
51
First Language
English
Primarily Uses
This would be how you would do it with Timers, but I would suggest using Wait with a parallel process.



If you need help with a Wait and parallel process version I would be happy to post that as well :)

Happy learning

Good day

               - DOTCreeper
 

Corrupted Ralph

The World Breaker
Veteran
Joined
May 24, 2015
Messages
197
Reaction score
51
First Language
English
Primarily Uses
Ok, after some thought i managed to solve it! 

Thnx for the tips :)







But the timer wont stop until i reach the map where the old lady is, unless I add the stop timer event to each map (Dont mind the Turn Off switch A, forgot to take it out)

Is there a way to apply this event (the stop timer one) to other maps without adding this event to each map in the game? I tried using Common Events, but it didnt worked...

Also, for future reference....is there a way to  hide the timer?
Also!

an easy way to hide the timer without removing it is to go into script editor...

Go into Sprites category

Click on Sprite_Timer

Line 68 of default script: self.y =

set it to something that will throw it off the screen for good!

like...

self.y = 9999

:3
 

Musashi

Veteran
Veteran
Joined
Oct 30, 2012
Messages
155
Reaction score
260
First Language
Portuguese
I think it's a lot easier this way:

$game_variables[2] - $game_variables[1] >= 8in the condition for a waiting time of 8 seconds
 
Last edited by a moderator:

Ursa Koda

Veteran
Veteran
Joined
Jun 10, 2016
Messages
110
Reaction score
76
First Language
Samoan
Primarily Uses
N/A
For myself, I HATE working with the timer. I have struggled for ages to get a bucket to refill after x amount of time, more than 999 frames.


So I do it the easy way; looking for a timer plugin. Anybody has a good and easy timer plugin for events to recommend??


WHY invent the wheel again, when someone more qualified and smarter than me has probably already done it, right?


Let me just state for the record, that I have great respect for all you people in here, young and old, doing what you do with gamedesign and programming.


Good community deserves recognition!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
Ursa Koda, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.



Please make a new topic with your questions
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top