• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How to Reset all 'A' self switches on a map.

Sir_Tman

Overworked game Dev
201
Posts
8
Years
  • Pretty much what the title entails.
    I'm aware how to change Self Switches with script calls, but I wish to change the Self Switches of multiple events at once.
     
    Last edited by a moderator:

    Telemetius

    Tele*
    267
    Posts
    9
    Years
  • Try this, I currently uninstalled RMXP and I couldn't test it but it should work:

    Code:
    for event in $game_map.events.values
      pbSetSelfSwitch(event,"A",false)
    end
     
    Last edited:
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Hi, did you got it?
    Can you explain me?
    Thanks!

    This thread is 4 years old. Anyways, I don't know if something changed from v15 or v16 to now, but the code Telemetius provided is not correct. Use this instead:

    Code:
    for i in $game_map.events.keys
      pbSetSelfSwitch(i,"A",false)
    end
     
    Back
    Top