Multi Timers

mads_in_zero

Villager
Member
Joined
Mar 8, 2019
Messages
9
Reaction score
1
First Language
English
Primarily Uses
RMMV
Ahh, okay! Thanks for the suggestions.

However, even when I enter:

Code:
AddTimer SongLogic 12.409 \sets(1, true)
(12.409 being the length of the first chunk), even with the change to the plugin file itself, fractions of a second don't seem to work, and the switch doesn't trigger.
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
237
Reaction score
166
First Language
English
Primarily Uses
Other
Has anyone ever got yep_self-switch/var plugin to be able to use with the timer?

Whenever I try the plugin command inside the event that the yep-self switch is being used it only turns off the actual switch (which is already off cause its being used as a self switch).

It works on the normal self switches A-D so i have the right command. Just wondering if anyone has got this way to work?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,454
Reaction score
12,015
First Language
English
Primarily Uses
RMMV
Please show the command you're using which works successfully, and the one which doesn't. Also a link to Yanfly's plugin to save us the trouble of searching for it.
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
237
Reaction score
166
First Language
English
Primarily Uses
Other
Please show the command you're using which works successfully, and the one which doesn't. Also a link to Yanfly's plugin to save us the trouble of searching for it.
Thanks for the reply Shaz.

Here is the link to yep self switches/variables: http://yanfly.moe/2016/08/06/yep-113-self-switches-variables-rpg-maker-mv/

Here is the command that works, by using a default self switch B:
Code:
addTimer <thismap>.<thisevent>.yepss1 3 \setss([<thismap>, <thisevent>, 'B'], true)
Here is the command that doesn't work, trying to use yeps self switch which is switch 62 and labeled Self Switch 1:
Code:
addTimer <thismap>.<thisevent>.yepss1 3 \setss([<thismap>, <thisevent>, 'Self Switch 1'], true)
I have also tried running it as a normal switch command, hoping it might recognized the ss version of switch 62:
Code:
addTimer yepss1 3 \sets(62, true)
But it didn't, it just turns on the actual (global) switch. Just was trying all possibilities.

Why can't I just use self switch A-D? That is a good question lol, we run ABS in our project and A+B self switches are taken up by event sensor plugins and the remaining for the ABS hit types. Your plugin works wonders with the way our enemies are programmed, but with the limitation to only the default A-D selfswitches its led me here to ask if it's possible to have yep SS be recognized.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,454
Reaction score
12,015
First Language
English
Primarily Uses
RMMV
Yanfly's plugin uses the switch number, not the name/label (the label is just an easy way for you to indicate which ones are self switches, but that's the only thing they're used for). If you turn on switch 62, it will update the self switch [mapid, eventid, 'SELF SWITCH 62']

Try this:
Code:
addTimer <thismap>.<thisevent>.yepss1 3 \setss([<thismap>, <thisevent>, 'SELF SWITCH 62'], true)
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
237
Reaction score
166
First Language
English
Primarily Uses
Other
Yanfly's plugin uses the switch number, not the name/label (the label is just an easy way for you to indicate which ones are self switches, but that's the only thing they're used for). If you turn on switch 62, it will update the self switch [mapid, eventid, 'SELF SWITCH 62']

Try this:
Code:
addTimer <thismap>.<thisevent>.yepss1 3 \setss([<thismap>, <thisevent>, 'SELF SWITCH 62'], true)
Wow, it worked! Thank you!

Edit: Ultra thanks to you @Shaz as this wording of the self switch also works with our ABS triggers xD 2 birds with 1 stone!
 
Last edited:

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
@Shaz

Dear Shaz. Could you tell me how I can manipulate Self Variables from Yanfly's Self Switches and Variables?
I see that you knew a solution for bazrat a month ago, regarding to self switches.

The self variable is called "Self Var nodes setup" and I would like to set it to 0 after 30 minutes.

Thank you in advance! :LZSsmile:
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,454
Reaction score
12,015
First Language
English
Primarily Uses
RMMV
@Nilom as I mentioned above, the variable name has no meaning. It's the variable number that's important. What is your variable number?

Fortunately Yanfly saves the self variables in the self switches object, not a new object, so you can use \setss to set a self variable (but not a regular variable).

If you use variable # 65 for Self Var nodes setup, you could try this in a plugin command:

AddTimer <thismap>.<thisevent>.SelfVar65 1800 \setss([<thismap>, <thisevent>, 'SELF VARIABLE 65'], 0)

or this:

AddTimer <thismap>.<thisevent>.NodesSetup 1800 \setss([<thismap>, <thisevent>, 'SELF VARIABLE 65'], 0)

if you wanted something a little more recognizable.

I suggest you try a much, much smaller number (like 10, or 30) for the timer, rather than 1800 - it'd be a shame to wait half an hour to find out the command isn't correct.y
 
Last edited:

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Thank you this is amazing! I will check later if I can find the self variable number and if it worked. :kaoluv:
Will it always be the same number as the variable ID? Or are 1-4 used by self switch A-D?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,454
Reaction score
12,015
First Language
English
Primarily Uses
RMMV
Yes, it will always be the same number as the variable ID, because that's the way Yanfly's plugin works. Self switches A-D use the letters A-D. Variable 1, if you have defined it as a self variable, will be SELF VARIABLE 1. Switch 1, if you have defined it as a self switch, will be SELF SWITCH 1. So they will never get mixed up with each other.
 

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Oh I see! That is pretty clever. Thank you again so much. :LZSsmile:

Edit:
@Shaz The timer seems to work perfectly fine!
Would it be possible to change the opacity of an event when the timer is finisehd? Or to alternatively have two commands in the same timer? Change (Self Var and Self Switch). I know I could probably use two timers for this, but I don't know how performance heavy that would be to double the neccecairy timers.

Edit 2:
I noticed that if I set two timers for the same event then the command of the first timer will be overwritten.
Code:
AddTimer <thismap>.<thisevent>.NodesSetup 10 \setss([<thismap>, <thisevent>, 'SELF VARIABLE 2'], 0)
AddTimer <thismap>.<thisevent>.NodesSetup 10 \setss([<thismap>, <thisevent>, 'A'], false)
Only the second command got executed. Even if I sat different times (10 and 11).
 
Last edited:

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

Latest Threads

Latest Profile Posts

Hi people! I was wondering... Here in Brazil, we have a whats app group for we talk about rpg maker and our projects. A more informal way for we meet each other. Is there any whats app group out there? :)
Ksi
Streaming the Valentine games from the RMN Valentiny event! Drop by and say hi!
How many Vocalist is on this forums?
Stream will be live shortly with some Witcher 3 followed by Haunting Ground! Feel free to drop by!
I have at least three ongoing projects and I have no idea what to do with them.

Gotta love game dev.

Forum statistics

Threads
94,277
Messages
919,592
Members
124,004
Latest member
soviet_guy
Top