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.

Checking for a switch when game player starts

Hi, I was wondering if there is a way to make it so that, when you start the game via the game player (not when loading a save, but literally when the game starts), it checks if a switch is on or off? I need a conditional branch where, if it's on, it does not play the intro that I have evented before the Title Screen, but if it's off, it does play it. Thanks!
 

Ares

Member

Well, the switches are off by default, and it loads the switches after the title screen (on continue).
So you would have to load the switches before that:

[rgss] class Game_Player < Game_Character #Game_Player class
 
begin #Before Main
 
if File.exist?("Save1.rxdata") # if Save file exists?
   $game_switches = load_data("Save1.rxdata") #Load switch data
   if $game_switches[ID] == true # Change ID to the switch ID
     # Special Intro
   else
    $scene = Scene_Title.new # Else, go to title
  end
end
 
end
 
end
[/rgss]
I once had something like this, which worked fine. If I can find it I'll post it.

EDIT: To make it work perfectly I'll have to check your scripts + events for that system.
Can you make me some sort of demo or upload your project?
 

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