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.
If you look under Interpreter 5, there's the code for transferring a player:
Code:
#--------------------------------------------------------------------------
# * Transfer Player
#--------------------------------------------------------------------------
def command_201
# If in battle
if $game_temp.in_battle
# Continue
return true
end
# If transferring player, showing message, or processing transition
if $game_temp.player_transferring or
$game_temp.message_window_showing or
$game_temp.transition_processing
# End
return false
end
# Set transferring player flag
$game_temp.player_transferring = true
# If appointment method is [direct appointment]
if @parameters[0] == 0
# Set player move destination
$game_temp.player_new_map_id = @parameters[1]
$game_temp.player_new_x = @parameters[2]
$game_temp.player_new_y = @parameters[3]
$game_temp.player_new_direction = @parameters[4]
# If appointment method is [appoint with variables]
else
# Set player move destination
$game_temp.player_new_map_id = $game_variables[@parameters[1]]
$game_temp.player_new_x = $game_variables[@parameters[2]]
$game_temp.player_new_y = $game_variables[@parameters[3]]
$game_temp.player_new_direction = @parameters[4]
end
# Advance index
@index += 1
# If fade is set
if @parameters[5] == 0
# Prepare for transition
Graphics.freeze
# Set transition processing flag
$game_temp.transition_processing = true
$game_temp.transition_name = ""
end
# End
return false
end
Do you need help figuring out what any part does? (I haven't really looked through it yet, so I'm not going to decipher and explain it if I don't need to)
I think there's also another way in which you create a new scene_map or something, but as I'm still new to this stuff, I'm not really sure. Maybe someone else can answer?
$game_temp.player_new_map_id = 2 # number of desired map
$game_temp.player_new_x = 20 # desired x co-ordinate
$game_temp.player_new_y = 20 # desired y co-ordinate
$game_temp.player_new_direction = 8 # desired facing direction in this case "UP"
Just incase people look at this page and go "I don't understand" there are quite a few of those where nobody posts what they figured out.
Ah I never thought about that I just quickly read the code moogleking provided from interpreter 5 and worked out what it did I didn't actually test it out, thanks to you and moogleking for helping me out.
Oh and thanks for the code to add to my mini script package 2 and thanks for the blacksmith module.