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] Transfer Player with Scripts

Status
Not open for further replies.
Can someone give me a code that teleports the player to a certain map with co-ordinates?
For example, I have an extra command in scene_title that starts the game else where, how do I make the player transfere command?
Thanks.
 
Code:
def transfer(map_id,x,y,d)
    $game_temp.player_transferring = true
    # If appointment method is [direct appointment]
      # Set player move destination
      $game_temp.player_new_map_id = map_id
      $game_temp.player_new_x = x
      $game_temp.player_new_y = y
      $game_temp.player_new_direction = d
end

^^Just add that Above main and Use like this
transfer(map_id,x,y,direction_player_faces)
 
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