[RGSS2/RM VX] Refresh? (or something like this) events on map with scripts

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 :

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^^
That call is kind of similar but you'd be forced to refresh pretty much ALL of the map events, 1 by 1 using an each loop like in the example below.

Ruby:
$game_map.events.each {|event_id, event| event.refresh }

You could also try a more comprehensive solution here:

Ruby:
$game_map.refresh

Or something excessively simple like the code below:

Ruby:
$game_map.need_refresh = true

These solutions seem to be available in all RGSS versions, 1 through 3.
Thanks you !
I finally use the simple one, witch work perfectly. I was sure it would be something obvious like that but yesterday I just coundnt found it^^'

Original thread: https://forums.rpgmakerweb.com/threads/rgss2-rm-vx-refresh-or-something-like-this-events-on-map-with-scripts.172473/