hi.
i don't know how to use this script;;
this script is not from rmxp and i don't know there is script like this. (if it exist, please link)
this script is for manage the other events's self switches.
i wrote this script like ths,
selfswitch(C, true, 4, 18) (in moving-root of event)
was it wrong?
please instruct me how to use this scrpt with example.
i don't know how to use this script;;
this script is not from rmxp and i don't know there is script like this. (if it exist, please link)
this script is for manage the other events's self switches.
http://cfs12.blog.daum.net/image/28/blo ... 547652.jpg[/img]
instruction : write the below method in "event->moving root->script" like above screen shot.
method : selfswitch(switch number ,value,MAPid,EVENTid)
and, copy the below script to script editor (f11).
class Game_Event < Game_Event
def selfswitch(_ch, _val = true, _map_id = 0, _id = 0)
if _ch.type == String
_ch = _ch.upcase
elsif _ch.type == Fixnum
_ch = ["A", "B", "C", "D"][_ch]
end
(_val == false or _val == 0) ? _val = false : _val = true
_map_id == 0 ? _map_id = $game_map.map_id : nil
_id == 0 ? _id = @id : nil
key = [_map_id, _id, _ch]
$game_self_switches[key] = _val
$game_map.need_refresh = true
end
end
[origin : http://rpgxp.gameshot.net/board]
i wrote this script like ths,
selfswitch(C, true, 4, 18) (in moving-root of event)
was it wrong?
please instruct me how to use this scrpt with example.