Hey everyone, I have a statue in my game where players can pray and receive their mana back. But I would like it to be on a timer so they can't just use it over and over again. Like have it refresh every 5 minutes or so. I have no idea how to go about this, or if it's possible. Thank you for reading and any comments.
Making a wait time
RPG Maker VXAce SupportYou could try a Timestamp Condition, that could look like this:
Code:
◆Text:None, Window, Bottom
: :Hero Party is offering their prayers.
◆Control Variables:#0012 var12 = Play Time
◆If:var12 > var13
◆Control Variables:#0013 var13 = var12
◆Comment:I believe Game Time was in Frames in VX Ace,
: :60 frames = 1 second
: :In MV Game Time is in seconds.
◆Control Variables:#0013 var13 += 18000
◆Text:None, Window, Bottom
: :An Item suddenly appears on the Altar.
◆Change Items:Potion + 1
◆
:Else
◆Text:None, Window, Bottom
: :Right now is not the Time for more prayers.
◆
:End
Galv's Event Respawn Timer will be perfect for your event timing needs. With this script, you can set up a recharge period of 5 minutes for the statue after you've used it.
How it works is the following:
- Set up the script call in the first page: set_spawn(0,0,300) (5 minutes is 300 seconds)
- Control it via show choices so the respawn timer only activates when you actually use the statue (optional. I dunno how you run this statue thing.)
- Activate Self Switch A
- Make a second page with Self Switch A where the statue is "drained", but put this in the autonomous route of the event: do_respawn?("C",true).
- This will make it so when the timer runs out, it will activate the third page.
- Make a parallel process third page where it cancels out self switch A and C. (Just to be safe put the same do_respawn script call inside of the autonomous route of the 3rd page)
- Voila, your statue is recharged.
Thank you. sorry for the delayed response. life got busy for a bit.
Original thread: https://forums.rpgmakerweb.com/threads/making-a-wait-time.147085/