Hi,
I've made a little script that allow me to change witch character of the team will be show on map.
With that, I changed some game switches but event that are link to them just dont update (until i change map, or reload the scene like calling menu or something else).
I couldnt found exactly how to call that with scripts.
This is what i've made :
Change the sprite work (as I already knew i needed refresh "game_player") but just couldnt find the line for events.
Well, to be short : I need the line to call just after game_switches changes to tell my game to update events states.
Thanks in advance^^
I've made a little script that allow me to change witch character of the team will be show on map.
With that, I changed some game switches but event that are link to them just dont update (until i change map, or reload the scene like calling menu or something else).
I couldnt found exactly how to call that with scripts.
This is what i've made :
Ruby:
class Scene_Map
alias update2 update
def update
update2
change_perso_map unless $game_message.visible
end
def change_perso_map
if Input.trigger?(Input::Y) and $game_party.members.size>0
$game_variables[246]+=1
$game_variables[246]%=$game_party.members.size
change_switches_perso
$game_player.refresh
end
end
def change_switches_perso
a = $game_party.members[$game_variables[246]].class_id
$game_switches[125]=false
$game_switches[126]=false
$game_switches[127]=false
$game_switches[128]=false
$game_switches[129]=false
$game_switches[130]=false
$game_switches[131]=false
$game_switches[132]=false
$game_switches[125+a]=true
end
end
Change the sprite work (as I already knew i needed refresh "game_player") but just couldnt find the line for events.
Well, to be short : I need the line to call just after game_switches changes to tell my game to update events states.
Thanks in advance^^