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.

[VX]Switches Stay On When Starting New Game

What I want is a VX script that makes it so when a switch is turned on in game, then you save, that switch is still on when you start a new game. Also make it so you can choose which switches this applies to.
 
Brewmeister":29ruvlkh said:
every switch, or just specific switches?

What happens if you have more than one save file, and the switches are different?

Specific switches, specified in the script.
And the game I'm going to use it in, I plan to only have one save file.
 
This can be done in the "new game" section using the code from the part of Window_SaveFile where it temporarily loads the savefile to show it in the Load File window. It also loads the game switches into @game_switches (not $game_switches).
In the "New Game" section, use Marshal.load to load everything up to the game_switches into temporary instance variables, then after $game_switches get initialized, set those specific switches to the values in your @game_switches that you read from the save file.

Why did I explain this instead of just doing it?  My VX Trial ran out yesterday, and I haven't bothered to buy it yet.
So, if another scripter wants to tackle it, it gives them a head start...

Sorry I couldn't be more help this time.

Be Well
 

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