2 years ago

You can change self switches of other events on the map with these script calls in VX Ace:


$game_self_switches[[@map_id, id, 'A']] = true

In id you put the Event ID of the event you want to change the switch of. @map_id can be left like that, as it will automatically put the current Map ID in it, but you can still replace it with any other Map ID number to change the self switch of an event in a different map.
example:

$game_self_switches[[124, 5, 'A']] = true

The letter A is for Self Switch A. You can use the letters A-D which are all the self switches you can use for an event.

If you want to check if a self switch of a different event is turned on or off, use this in a conditional branch:

$game_self_switches[[$game_map.map_id, 17, "A"]] == false

This would check if Event 17 has Self Switch A turned off on the current map.
($game_map.map_id & @map_id are pretty much the same thing, but $game_map.map_id can be used in other scenes as well, like in the menu or in battles.)

$game_self_switches[[21, 4, "C"]] == true

And this would check if Event 4 on Map 21 has Self Switch C turned on.

In case you want to turn many self switches of several different events off or on, use this in a script call to make the process faster:

ids = (3..14).to_a

ids.each do |id|

$game_self_switches[[@map_id, id, 'A']] = true

end

this switches on self switch A for all the events with an ID number from 3-14.

#scripting #rpgmakervxace #rpgmaker



1 comment

Loading...

Next up

Permanent Elemental Drills

Drill Combo. The more walls you drill back-to-back the faster you get (Both drill-speed and move-speed) and in turn the less control you have in your movement.

Jungling through the Jungle Dungeon

MAKE friends and foes, SAVE your friends or EXPLORE the unseen... because DRUG STORY's tomorrow, with the all new CHAPTER 4!

Available August 27th on Windows, MacOS and Linux featuring 4 chapters.

Early Access for Gefährliche Liebe - (Boy x Reader) is out.

The full game is available for playing! I hope you all enjoy it! I had some weird troubles trying to release it, but it all should be working properly now, but if you find some bugs or errors, feel free to comment so I can fix it!!

Placing down objects like torches or turtles has always scared off monsters. Especially turtles.

Battle against the last boss except you aren't participating since you're just there to drill rocks.

# Small tweak for lumberjacks who not only cut down trees, but will also plant them after cutting.

Driller getting desperate for destructive machines