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.

[Resolved] Teleporting w/o going into game

Status
Not open for further replies.
How would I go about teleporting a player without pulling him into the game.

Heres what i am forced to use. It doesn't work because the first screen is to choose a character, and it is autorun. So anyone have another one?

I use the def transfer script.


$Game_Temp = Game_Temp.new
$game_temp.player_transferring = true
$game_temp.player_new_map_id = 4
$game_temp.player_new_x = 9
$game_temp.player_new_y = 13
$game_temp.player_new_direction = 8
 

khmp

Sponsor

Nah. He's looking for an answer to a problem I helped create :D. The problem I ran into with this is that the player first needed to be on the map to transfer him to another map. I don't know enough about RMXP to get around it. But I'll look at it again.

[edit1]
Shiroun you're still not using [code][/code] tags! And uncapitalize

$Game_Temp # wrong
$game_temp # right

[edit2]
Add this method to Scene_Title just before the last end ok?
Code:
  #--------------------------------------------------------------------------
  # * Command: Go To
  #--------------------------------------------------------------------------
  def command_goto(nosound = false)
    # Play decision SE
    $game_system.se_play($data_system.decision_se) unless nosound
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $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
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup(4)
    # Move player to initial position
    $game_player.moveto(9, 13)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end

And then where you have it printing "Go to Waypoint", use:
Code:
command_goto(true)
 

arev

Sponsor

This topic has been resolved. If shiroun or any other users have any questions or further problems regarding this topic, please create a new thread about them.

Thank you!
 
Status
Not open for further replies.

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