Hello. Its good to see all of you, great people of rmrk!)
Basically, i need a script similiar to this one:
http://rmrk.net/index.php?topic=32084.0 (http://rmrk.net/index.php?topic=32084.0)
it allows to change self switches even if you're doing it from another event or location
What it cannot do, is set, for example, switches A, B, C, and D to false in events from 14 to 91 on map 3
I think its possible...
for i in 14...91
control_self_switch (3, i, 'A', false)
control_self_switch (3, i, 'B', false)
control_self_switch (3, i, 'C', false)
control_self_switch (3, i, 'D', false)
end
Put that in a call script. You can adapt it for whatever purposes you need to
Quote from: modern algebra on January 16, 2011, 06:21:44 PM
for i in 14...91
control_self_switch (3, i, 'A', false)
control_self_switch (3, i, 'B', false)
control_self_switch (3, i, 'C', false)
control_self_switch (3, i, 'D', false)
end
Put that in a call script. You can adapt it for whatever purposes you need to
When you're doing this, make sure to set the range correctly
14...91 is from 14 to 91, but not 91
14..91 is from 14 to 91, including 91.
Yes! Thank you! I'll try that immediatly after i finish up my work!
----EDIT----
am i doing it right?
here goes the first one by TDS
def alter_self_switch(map_id, event_id, self_switch, value)
key = [map_id, event_id, self_switch]
$game_self_switches[key] = value
$game_map.refresh
end
and then
def reset_shaft
for i in [4,10,12..17,20,21,23..92]
alter_self_switch (47, i, 'A', false)
alter_self_switch (47, i, 'B', false)
alter_self_switch (47, i, 'C', false)
alter_self_switch (47, i, 'D', false)
alter_self_switch (47, i, 'E', false)
alter_self_switch (47, i, 'F', false)
alter_self_switch (47, i, 'G', false)
alter_self_switch (47, i, 'H', false)
alter_self_switch (47, i, 'I', false)
alter_self_switch (47, i, 'O', false)
alter_self_switch (47, i, 'P', false)
alter_self_switch (47, i, 'Q', false)
end
end
(about those E, F, G etc. - i've used the 'extra control switches' script by mr. MA)
---edit---
please? help?
I don't see why it wouldn't work.
Thank you Jaffer!
it is [RESOLVED]