=begin
================================================================================
xXx Kuro Change Player Location xXx
V.1.1
by Kuro Creator
================================================================================
* Introduce
It's similar with the event command "Change event location" but, it using
player instead of event
It will instantly change player location on the map
without use fading!
================================================================================
* How to use
Insert this script below ? Materials, but above ? Main
Call this script on event command to change player location
$game_map.change(x_pos, y_pos)
x_pos = New X position for player
y_pos = New Y position for player
Call this script on event command to exchange your player position with event
$game_map.exchange(event_id)
event_id = the id of the event
Call this script after that to remove the glyphs
$scene = Scene_Map.new
================================================================================
* TIPS
You can use variable for the id by call this script
$game_map.change($game_variables[m], $game_variables[n])
m = Variable id for X position
n = Variable id for Y position
$game_map.exchange($game_variables[x])
x = the id of the variable
example:
$game_map.change($game_variables[4], 18)
The new player's X position will be the value of variable 4, and Y position
will be 18
================================================================================
* Changelog
V.1.0 (8-6-2010)
* Finish the script
V.1.1 (9-6-2010)
* Change the script name from "Swap Player - Event" to
"Change Player Location"
* Added feature, change player location without fading
================================================================================
* Terms of Use
This is just a simple script. No credit is okay, But if you want to....
credit : Kuro Creator
================================================================================
=end
class Game_Map
def exchange(event_id)
ex = $game_map.events[event_id].x
ey = $game_map.events[event_id].y
px = $game_player.x
py = $game_player.y
$game_player.moveto(ex, ey)
$game_map.events[event_id].moveto(px, py)
$game_map.need_refresh = true
return true
end
def change(x_pos, y_pos)
$game_player.moveto(x_pos, y_pos)
$game_map.need_refresh = true
return true
end
end
#===============================================================================
# END OF SCRIPTS
#===============================================================================