Hi. So, first of all, the script I'm having trouble with is the one called 'Simple Self Switches' by Nicke. Here's a link to that.
www.rpgmakercentral.com
So, what I'm trying to do is set all Self-switches on multiple events across multiple maps to false in a single script call. The script has a command that goes 'setAllSelf(map, id, true/false)'. This command allows me to set all Self-switches of a single event on a single map to either true or false. Fortunately, with a more complicated script call, I can set all Self-switches of multiple events across multiple maps. The script call I use is the following.
event_ids = [3,5,7]
map_ids = [3,4]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
This script call sets all Self-switches on events 3, 5 and 7 on maps 3 and 4 to false. I don't know if there's a less complicated way to do it and I don't remember if I came up with this script call myself or found something similar somewhere on the Internet (Probably the latter) but what I do know is that it works. However, this method is a bit tedious and unreliable due to the sheer amount of events and maps that I want to affect. The end result would look more like the following.
event_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, all the way up to 100]
map_ids = [1,2,3,4,8,9,10,11,13,17,18,19,20,21,22,23,51,52,53,54,55,56,57,61,62,63, and who knows how many other maps]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
The issue that comes with this is that a script call can only fit so much on a single line. The program can't read it causing a crash and an error message. I was under the impression that I could somehow compress the arrays (Is that what they're called?) and make it look more like the following.
event_ids = [1..100]
map_ids = [1..11,13,17..23,51..57,61..63]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
This no longer causes a crash but instead does absolutely nothing. Isn't that '..' thing supposed to mean 'All values between the former and the latter' or did I completely misunderstand that? Anyway, can this somehow be achieved? Can my script call somehow be fixed to work or is this a lost cause? Fortunately, I have a backup plan so I'm not too worried.
Simple Self Switches
Simple Self Switches Version: 1.0a. Introduction Change your Self Switches easy by using this script. Simply use the call script function to change self switch of the Event ID to true or false. Features Plug and play. Easy to change Self Switches. Use a variable to change Self Switches on another...
So, what I'm trying to do is set all Self-switches on multiple events across multiple maps to false in a single script call. The script has a command that goes 'setAllSelf(map, id, true/false)'. This command allows me to set all Self-switches of a single event on a single map to either true or false. Fortunately, with a more complicated script call, I can set all Self-switches of multiple events across multiple maps. The script call I use is the following.
event_ids = [3,5,7]
map_ids = [3,4]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
This script call sets all Self-switches on events 3, 5 and 7 on maps 3 and 4 to false. I don't know if there's a less complicated way to do it and I don't remember if I came up with this script call myself or found something similar somewhere on the Internet (Probably the latter) but what I do know is that it works. However, this method is a bit tedious and unreliable due to the sheer amount of events and maps that I want to affect. The end result would look more like the following.
event_ids = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, all the way up to 100]
map_ids = [1,2,3,4,8,9,10,11,13,17,18,19,20,21,22,23,51,52,53,54,55,56,57,61,62,63, and who knows how many other maps]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
The issue that comes with this is that a script call can only fit so much on a single line. The program can't read it causing a crash and an error message. I was under the impression that I could somehow compress the arrays (Is that what they're called?) and make it look more like the following.
event_ids = [1..100]
map_ids = [1..11,13,17..23,51..57,61..63]
for event in event_ids
for map in map_ids
setAllSelf(map, event, false)
end
end
This no longer causes a crash but instead does absolutely nothing. Isn't that '..' thing supposed to mean 'All values between the former and the latter' or did I completely misunderstand that? Anyway, can this somehow be achieved? Can my script call somehow be fixed to work or is this a lost cause? Fortunately, I have a backup plan so I'm not too worried.