Please help with Shaz Multi Timers

rauwolf

Villager
Member
Joined
Jul 16, 2015
Messages
24
Reaction score
0
First Language
English
Primarily Uses
Hello, Im having a really hard time getting this plugin to work. I want to have an event that has the timer(which is not showed) that starts between 1 and 3 minutes and when it reaches 0 it causes a game over for the player. Ive tried different ways to follow the help file but still not sure why its not working. Any help would really be appreciated.

pic1.png
 

rauwolf

Villager
Member
Joined
Jul 16, 2015
Messages
24
Reaction score
0
First Language
English
Primarily Uses
This is the help file for the plugin:


This plugin allows you to set multiple timers at once, along with a command


to be executed after the timer expires. There is no timer display.


Plugin Commands:


AddTimer key seconds command - sets a timer with key


DeleteTimer key - deletes timer with key


HasTimer key switchId - turns switch on if a timer with that key is active


TimeLeft key varId - sets a variable to the number of seconds remaining


key = any numbers/text (no spaces) to identify unique timers


seconds = seconds to run


command = command to run on expiry (may be any command, and include spaces)


switchId = id of switch to set on in HasTimer call if timer exists


varId = id of variable to set to seconds remaining on timer


The following codes can be used and substituted as follows:


<thismap> - id of current map


<thisevent> - id of current event


\setSS - set self switch


\setS - set switch


\setV - set variable


\ss - self switch value


\s - switch value


\v - variable value


Examples:


addTimer opendoor 300 \sets(10, true)


sets a timer for 5 minutes (300 seconds) to turn on switch 10, which


controls the opening of a door


addTimer eggsHatched 600 \setv(8, \v(8) + 1)


sets a timer for 10 minutes (600 seconds) to increment variable 8 by 1,


which controls how many eggs have hatched


addTimer <thismap>.<thisevent>.A 180 \setss([<thismap>, <thisevent>, 'A'], true)


sets a timer for 3 minutes to turn the current event's self switch A on


the name/key of the timer, if the event is EV008 on map 3, will be 3.8.A


deleteTimer opendoor


cancels the timer previously called opendoor (case insensitive)


hasTimer <thismap>.<thisevent>.A 15


if run on EV008 on map 3, turns switch 15 on if there is a timer for 3.8.A


timeLeft eggsHatched 5


sets variable 5 to the number of seconds remaining before an egg hatches
 

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
127
First Language
English
Primarily Uses
RMMZ
Have you tried making the timer on the event on page one and then have the game over call on page 2 with self switch A on with it set to autorun?


from the looks of that event page it will only activate WHILE self switch A is on, but you are turning on self switch A in your timer code.


These pics are an example of what I'm saying, and I'm assuming your timer name works properly :)


Screenshot 1.pngScreenshot 2.png
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
The reason it's not working the way you have it is because you've set the timer, but you've told it to do a gameover immediately.  The timer is for setting switches and things to be modified at the expiry of the time period.  If you want to have something happen at the end of that time, you need a different event, or a different page on the current event, to be conditioned by the switch that the timer is modifying.  Any commands you add after the plugin command will just happen as soon as the plugin command is run.


The post above is also incorrect, as the self switch is still being turned on manually (not waiting for the timer to turn it on), causing it to go to the next page straight away and execute the gameover.


What is path1.gameover?  That is meant to be a switch id.  Unless you have some plugin that's going to interpret path1.gameover as a number, that argument is not going to work.


What should happen if the player goes to another map while the timer is still running?  Should it still be gameover?  Should it only be gameover when they return to the current map?  Should the timer be cancelled if they leave the map?



Also, you've really got some serious issues with your event.  It's an autorun event, with a single page, conditioned by a self switch.  That page will never be run, and if it WAS ever run, it'd never end, so the timer would keep getting reset each frame and would never run out, even if you removed the gameover command.  Exit Event Processing only works on player-initiated triggers, not on autorun or parallel process events.  I suggest you take a look through the tutorials at the link in my signature and learn more about event triggers and event pages.


If you just want it to execute a gameover no matter where you are, when the timer runs out, put this as your command:


AddTimer gameover 60 SceneManager.goto(Scene_Gameover);




but it's still not going to work until you sort out the trigger and page conditions.
 
Last edited by a moderator:

Ahuramazda

Veteran
Veteran
Joined
Nov 9, 2012
Messages
262
Reaction score
127
First Language
English
Primarily Uses
RMMZ
Ooops I see what I did there, lol


I was barely awake when I was attempting to help... but its interesting you can call scenes with the same line as a timer. I'll have to keep that in mind since I'm using this plugin as well
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You can run ANY command.  The switches and self switches and variables are just shortcuts I added to make what I expected to be the most common requests easier to implement.  So anything you can do with a script call, you can do with the multi timer plugin.  I think :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,470
Members
137,821
Latest member
Capterson
Top