Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved]Turn off all Self Switches

Script Title:
Turn off all Self Switches
RMXP or RMVX:
XP
Detailed Description:
I just need a script that turns off all the self switches of Events in my game. That is every event on every maps, all the self switches need to be deactivated from another event in another map.
 
That's thrown me an eroor, actually. I get this;

errorgqj.png


I've just put what you've got into a script call, is that right?
 

Ares

Member

Hmm....
I'm going to give this a shot, too. I've actually been wanting to do that for some time.

ch2.PNG

:D


EDIT: I kind of did it.
[rgss]def clear
    @data.clear
  end
[/rgss]
put this ^ in Game_SelfSwitches, below:

[rgss]def []=(key, value)
    @data[key] = value
  end
[/rgss]

if you call $game_self_switches.clear, all self switches will be reset.

But there's one bug: all self switches on the map you're on are reset, but all changes are only shown if you re-enter that map....
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top