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.

New Game Syntax

Okay guys, this should be an easy one... I think. What would the syntax be for calling a new game, as if "New Game" were selected from the title screen. I know it's something to do with Scene_Title and command_new_game, but I'm really not sure on the syntax. Thanks in advance!
 
Unless it's the Scene_End, or all that fancy fading and such you want, I'd use this line of code. It's much more efficient, or faster, I suppose. Dunno how much that matters though:
$scene = nil
 
Just a quick remark, the term "syntax" isn't well used here. The syntax of a programing language is the definition of how should the code be written, in this case how the ruby code must be written to be interpreted by the program later. So, the syntax isn't the code itself.

"$scene = Scene_Title.new.command_new_game" would be a expression, a script or more likely a code snippet in this case.
 
Is the code snippet for checking if save files are present is "@continue_enabled = true/false" or am I wrong? I'm working on an evented title screen, and I need to know the code snippet for checking for save files that can be used in conditional branch's script option.
 
@Miles Castea, haha, you also don't say "the code snippet for", because there are many ways for programing a code that does the same thing. "Is there a code snippet for doing something?" or "How would be a script/code for doing something?" are nicer :)

And here you have a code snippet for a conditional branch that will check if a save file exists
RMXP:
Code:
Dir.glob('Save*.rxdata').size > 0
RMVX:
Code:
Dir.glob('Save*.rvdata').size > 0
 

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