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.

Having trouble with some scripting.

I am fairly getting the hang of getting my evented title screen (what I've evented so far) to work, with a little bit of lines of code everynow and then. However, something has stopped my progress: The New Game and Continue parts I'm working on. For the new game part, I was using "$scene = Scene_Title.new.command_new_game" and a transfer command to transfer the player to the intro of the game. Even though it does clear the gamedata, it didn't do what I expected. How would I make clear the gamedata for a new game and THEN teleport the player to the into? And my continue problem...same case with "$scene = Scene_Title.new.command_continue", but instead the game.exe window closes without warning.
 
You want to create a cut-scene intro on the map before the title? I have a similar idea, but it made differently.

Doing "main" of such a sample:
Code:
 

#==============================================================================

# ** Main

#------------------------------------------------------------------------------

#  After defining each class, actual processing begins here.

#==============================================================================

 

begin

 

    $data_actors        = load_data("Data/Actors.rxdata")

    $data_classes       = load_data("Data/Classes.rxdata")

    $data_skills        = load_data("Data/Skills.rxdata")

    $data_items         = load_data("Data/Items.rxdata")

    $data_weapons       = load_data("Data/Weapons.rxdata")

    $data_armors        = load_data("Data/Armors.rxdata")

    $data_enemies       = load_data("Data/Enemies.rxdata")

    $data_troops        = load_data("Data/Troops.rxdata")

    $data_states        = load_data("Data/States.rxdata")

    $data_animations    = load_data("Data/Animations.rxdata")

    $data_tilesets      = load_data("Data/Tilesets.rxdata")

    $data_common_events = load_data("Data/CommonEvents.rxdata")

    $data_system        = load_data("Data/System.rxdata")

 

    $game_temp          = Game_Temp.new

    $game_system        = Game_System.new

    $game_switches      = Game_Switches.new

    $game_variables     = Game_Variables.new

    $game_self_switches = Game_SelfSwitches.new

    $game_screen        = Game_Screen.new

    $game_actors        = Game_Actors.new

    $game_party         = Game_Party.new

    $game_troop         = Game_Troop.new

    $game_map           = Game_Map.new

    $game_player        = Game_Player.new

    $game_party.setup_starting_members

    $game_map.setup($data_system.start_map_id)

    $game_player.moveto($data_system.start_x, $data_system.start_y)

    $game_player.refresh

    $game_map.autoplay

    $game_map.update

    $scene = Scene_Map.new

    

  Graphics.freeze

  while $scene != nil

    $scene.main

  end

  Graphics.transition(20)

rescue Errno::ENOENT

  filename = $!.message.sub("No such file or directory - ", "")

  print("File #{filename} not found.")

end

 

Then, in Scene_title in def command_new_game lines (after the 107 line) insert the following code:$game_switches[№ of switch] = true

Now create a map necessary for you to intro, and at the end put the Event "Return to title screen". After that create a event with switch in conditions, which you wrote in Scene_Title and wrote the events, which starts the game.
 
Just to clarify, for new game; I need it to clear the gamedata like an actual newgame does before it sends the player to the intro. For continue, I simply want it to bring up the load save file screen without any problems.
 

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