Hi everyone,
I'm running out of time, too much on my head yet I still want to finish my submission.
Is there a command or something i can use to turn all the self switches on / off on a map on somehow? Otherwise making switches for each little item it going to be a nightmare and will take quite some time... I'd rather add more content in the meantime. Or just something like turn all ''A'' switches on the map with the ID 001, I really don't know what script calls I could use there...
Thanks a ton!
You could use a conditional branches to tie them all into a single variable trigger, as I have done this in the past. But there may be an easier way. Perhaps a better mind has a better answer. 🤘
Hmm... I'm not sure how I could make that work, maybe with some really complex branch as they are all separate things. I'd just erase event, but it would mean infinite loot... Hmm.
Ah, I also forgot to mention that I'd need to change them from a different map.
You can use a script call to turn off a self switch, regardless of what map it is on. The call is
$game_self_switches[[map id, event id, self switch id]] = 'false' will turn it off.
Note though that for the self switch id the id has to be enclosed in ''. So for switch A, you would use 'A'.
You might be able to use that and a loop to do it from another map?
If you know which switches will be turned off and on, try this:
[*1..10].each do |random name|
$game_switches[random name] = false
end
1..10 groups together the switches with the id number 1 to 10.
If you want to group random switches then try this:
[1,5,10,3000].each do |another random name|
$game_switches[another random name] = false
end
You can combine this the with script call above like this:
[1,5,10,3000].each do |event_id|
$game_self_switches[@map_id, event_id, "A/B/C/D"] = false
end
@map_id should automatically replace itself with the number of the map you are in, in case the self switches you want to deactivate are in the same map.
Huh, both solutions will work, thanks!
Feel free to close it.
If you want your thread closed, please Report your opening post (the Report button is bottom right, near the multiquote button) and ask for it to be closed. The mod for this forum might not see your post, but will see your Report.
Thanks.