Help with autorun / switch activation

rpggirl2134

Villager
Member
Joined
Jul 6, 2019
Messages
29
Reaction score
3
First Language
english
Primarily Uses
RMMV
OK -

I want this event to check if two different switches are on, and if so, to activate a third switch.

I want this event to run each time the player enters the map to check if the two precursor switches are on.

I have it set to autorun, but it gets stuck in an infinite loop. What is the best way to do this?

Capture7.PNG
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,710
Reaction score
1,127
First Language
Portuguese - Br
Primarily Uses
RMMZ
Do not use the Exit event processing, since it only does is take the game interpreter of the page to the last line.

Use the "Erase event", so every time you enter the map, this event will play once and be erased.
When you return to this map, the event will be there again.
 

CHKNRAVE

Surprisingly not sponsored by Yanfly.
Veteran
Joined
May 11, 2020
Messages
134
Reaction score
73
First Language
French
Primarily Uses
RMMV
You've got 2 switch conditions in the event's page. Put both switches in there, the switch activation in the event's page (automatic), and a page 2 with the only condition being that third swich being on.
 

rpggirl2134

Villager
Member
Joined
Jul 6, 2019
Messages
29
Reaction score
3
First Language
english
Primarily Uses
RMMV
Thanks guys -

Both responses work and make sense.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,948
Reaction score
1,054
First Language
Dutch
Primarily Uses
RMMV
instead of if swithc x is ON and if switch Y is one, make 1 condition:

if: script: $gameSwitches.value(x) && $gameSwitches.value(y)
do this
end

this checks if both switchs are ON, there is also a plugin to make it shorter
found here. work with variables, switches, items, armor etc if you need it alot.
than that plugin makes things easier.
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
210
Reaction score
448
First Language
English
Primarily Uses
RMMV
You can use the 2 built in switch checks to the left, put the required switches there and when the conditions are met the event will autorun, just make a "self switch A: On" at the end and second blank page which requires said self switch to end it, no need to manually check everytime.
 

CHKNRAVE

Surprisingly not sponsored by Yanfly.
Veteran
Joined
May 11, 2020
Messages
134
Reaction score
73
First Language
French
Primarily Uses
RMMV
You can use the 2 built in switch checks to the left, put the required switches there and when the conditions are met the event will autorun, just make a "self switch A: On" at the end and second blank page which requires said self switch to end it, no need to manually check everytime.
Why involve a self-switch, when the page 2 condition can be the regular switch that's turned on by page 1?
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top