Splash Script

Splash Script


Introduction
This makes it so when your game loads up it loads up a map just follow the instructions! also to go to the title screen use the call script event and use
  1. $scene = Scene_Title.new
Expand to see the code.


Instructions
Replace main with this and follow the comments and change the right numbers!
  1. begin
  2. $data_actors        = load_data("Data/Actors.rxdata")
  3.    $data_classes       = load_data("Data/Classes.rxdata")
  4.    $data_skills        = load_data("Data/Skills.rxdata")
  5.    $data_items         = load_data("Data/Items.rxdata")
  6.    $data_weapons       = load_data("Data/Weapons.rxdata")
  7.    $data_armors        = load_data("Data/Armors.rxdata")
  8.    $data_enemies       = load_data("Data/Enemies.rxdata")
  9.    $data_troops        = load_data("Data/Troops.rxdata")
  10.    $data_states        = load_data("Data/States.rxdata")
  11.    $data_animations    = load_data("Data/Animations.rxdata")
  12.    $data_tilesets      = load_data("Data/Tilesets.rxdata")
  13.    $data_common_events = load_data("Data/CommonEvents.rxdata")
  14.    $data_system        = load_data("Data/System.rxdata")
  15. $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
  16. # Font used in windows
  17. $defaultfonttype = $fontface = $fontname = Font.default_name = "Arial"
  18. # Font size used
  19. $defaultfontsize = $fontsize = Font.default_size = 18
  20. Graphics.freeze
  21.  $game_temp          = Game_Temp.new
  22.    $game_system        = Game_System.new
  23.    $game_switches      = Game_Switches.new
  24.    $game_variables     = Game_Variables.new
  25.    $game_self_switches = Game_SelfSwitches.new
  26.    $game_screen        = Game_Screen.new
  27.    $game_actors        = Game_Actors.new
  28.    $game_party         = Game_Party.new
  29.    $game_troop         = Game_Troop.new
  30.    $game_map           = Game_Map.new
  31.    $game_player        = Game_Player.new
  32.    
  33.    #This controls the Map ID which you are taken to when it starts
  34.          $map = @map_id = 1
  35.    
  36.        #This controls the x coordinance which you are taken to when it starts      
  37.          $x = @display_x = 1
  38.    
  39.            #This controls the y coordinance which you are taken to when it starts  
  40.          $y = @display_y = 1
  41.    
  42.    $game_party.setup_starting_members
  43.    
  44.    $game_map.setup($Map)
  45.    $game_player.moveto($x,$y)
  46.    
  47.  
  48.        
  49.    $game_player.refresh
  50.    $game_map.autoplay
  51.    $game_map.update
  52.    $scene = Scene_Map.new
  53.    while $scene != nil
  54. $scene.main
  55.  Graphics.freeze
  56.  end
  57.  Graphics.transition(20)
  58. rescue Errno::ENOENT
  59.  filename = $!.message.sub("No such file or directory - ", "")
  60.  print("File #{filename} not found.")
  61. end
Expand to see the code.

Incompatibility
Other splash scripts


Other information...
Yes i relize i could have used a local variable method but this was before i learned that so deal with it! :P
how does your game load up? It doesn't load usually...

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=7072