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.

Need additional help resetting all self-switches.

edit: This probably should be moved to "RPG Maker Scripts."


I'm talking about resetting all self-switches for every event on every map in the entire game. I asked on another forum if there was a simple way to do this and someone known for scripting just told me to run a script with the following code:

$game_self_switches = Game_SelfSwitches.new

It looks something like this:

resetself-switches.png


It didn't work. Someone else pointed out that RMXP sometimes has problems if a command is broken up between 2 lines?

Is this true? Is this the correct script to run? Any ideas?
 
Brewmeister":362rd2xb said:
$game_self_switches = \
Game_SelfSwitches.new


Just escape the return/enter/linefeed character with a backslash

Hm...

I think the game is reading it fine (?), but it just isn't doing anything. A problem with the script itself?

Does anyone have any other ideas to reset all self-switches on all events on all maps?

Thanks.
 
*bump*

I'm getting the bug to finally finish what I started. And this is kind of a key feature for the ending of the game. (I literally only have the final dungeon to finish in what turned out to be a 20-30 hour game.)

Any help is greatly appreciated.
 
So, the problem isn't that the self switches aren't being updated, it's that the map isn't being refreshed. I made a demo project to show you how it worked. If you're wondering what the script call is, I inserted a tiny script just above main to deal with it. You can find the demo here. If you need to preserve the current position of any other movable events within view, and they get reset when you teleport, just use the same basic method I used to reset the map. Save their location and direction (before teleporting the player), and use a move event action just after teleporting the player. I recommend that if you do that, you should actually set up a transition before teleporting the player, and then run the transition on the shortest possible fram after teleporting. (And it should be a single image that is just one color, so it's not exactly visible as a transition)
 

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