(RMXP) Is it possible to control different event self switches with one event?

paladin119

Villager
Member
Joined
Oct 16, 2012
Messages
11
Reaction score
0
First Language
english
Primarily Uses
This is a somewhat complex problem/question... please read my entire post before replying!

So, let's say I have Event 1, Event 2 and Event 3, which are all cutscene starters when the player walks over them. 

Player happens to trigger Event 2 first and they go through the cutscene and now Event 1 and Event 3 are no longer needed. Event 2 turns on a self switch so it won't replay anymore and moves Event 1 and Event 3 off to some corner of the map where the player can't access them. However, if the player returns to the same map... Event 2 will not replay since it's self switch was triggered... however... Event 1 and Event 3 are back in their original positions and will play the old cutscene if the player touches them. Is their no way for Event 2 to turn on Event 1 and Event 3's self switches as well? 

I know, in the above scenario, I could have Event 2 start a autorun or parallel process when its self switch is already on, to move the unnecessary events out of the player's reach if they reenter the map and I have done that before... however it just seems kind of messy to me. I'd much prefer just triggering the self switches for all events that need to be changed but I can't seem to figure out how to do that with just one event. 

I don't know if you can do it with variables... I try to avoid variables as much as I can. They still confuse me. 

Thanks for the help!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Why don't you just do a single regular switch instead of self switches? That's what they're there for.


If you MUST use self switches, you can turn on event 1's self switch from event 2 with the following script command:

$game_self_switches[[@map_id, 1, 'A']] = true
In fact, controlling one event's self switch from another event is going to make it extremely difficult if you have issues and need to figure out why it's not working. If you have a page on an event conditioned by a self switch, you normally assume that some other page in the same event is going to turn it on. Controlling it from another event would make it very hard to find out where it's turned on, 3 months later when you've long moved on to other elements of your game.
 
Last edited by a moderator:

paladin119

Villager
Member
Joined
Oct 16, 2012
Messages
11
Reaction score
0
First Language
english
Primarily Uses
Why don't you just do a single regular switch instead of self switches? That's what they're there for.

If you MUST use self switches, you can turn on event 1's self switch from event 2 with the following script command:

$game_self_switches[[@map_id, 1, 'A']] = trueIn fact, controlling one event's self switch from another event is going to make it extremely difficult if you have issues and need to figure out why it's not working. If you have a page on an event conditioned by a self switch, you normally assume that some other page in the same event is going to turn it on. Controlling it from another event would make it very hard to find out where it's turned on, 3 months later when you've long moved on to other elements of your game.

Thanks for the reply.  Well, I'm coming back to a project after not working on it for a couple years... and I already have 47 switches with no idea what they do really lol.  I guess I should have kept notes explaining each switch.  So I'm trying to use self switches whenever possible to cut down on the switch clutter now. With only about a few hours worth of gameplay developed so far, I feel like I'm using too many switches already. This was my first project I learned how to use the program with though so it wasn't put together in the most efficient way. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
mmm - when you use a switch, you should name it. Give it a descriptive name and you'll know what it does.


Anyway, it doesn't matter what THOSE switches were used for - use a new one. A normal game will use several hundred switches, maybe a thousand or more, and they are designed to use when you want to affect several events by a single action. Trying to invent new ways of doing things when the engine already provides an efficient way is just making things hard for yourself.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top