Slipknot made a warp script like this for XP over at Creation Asylum.
(http://www.creationasylum.net/index.php?s=3dde3cb9b9f1459f0c4b94437b467b8d&showtopic=12181
It teleports to the same x and y on a different map, and returns to the previous map if the hero's standing on an impassible area.
Edit: Whoops, I was requesting a similar script for VX, with this script as reference, as this is an XP script o.O It wasn't clear enough o.O
(http://www.creationasylum.net/index.php?s=3dde3cb9b9f1459f0c4b94437b467b8d&showtopic=12181
Code:
#============================================================
# ** Warp Script
#------------------------------------------------------------------------------
# Sheol / Slipknot (www.creationasylum.net)
# Version 1.2
# Jenuary 28, 2008
#============================================================
module Warp
#--------------------------------------------------------------------------
# * Maps
#--------------------------------------------------------------------------
Maps = {
1 => 2,
2 => 1
}
#--------------------------------------------------------------------------
# * Transition
#--------------------------------------------------------------------------
Transition = 48
File = '007-Line01' # nil = normal transition
#--------------------------------------------------------------------------
# * Variable ID
#--------------------------------------------------------------------------
Variable = nil
#--------------------------------------------------------------------------
# * Can Warp?
#--------------------------------------------------------------------------
def Warp.can?
Maps[$game_map.map_id] != nil
end
#--------------------------------------------------------------------------
# * Transition
#--------------------------------------------------------------------------
def Warp.transition
File ? Graphics.transition(Transition, 'Graphics/Transitions/'+File) :
Graphics.transition(Transition)
end
end
#============================================================
# ** Game_Temp
#============================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :warp
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias slipknot_warp_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
slipknot_warp_init
@warp = false
end
end
#============================================================
# ** Interpreter
#============================================================
class Interpreter
#--------------------------------------------------------------------------
# * Alias Listing
#--------------------------------------------------------------------------
alias slipknot_warp_upd update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
if $game_temp.warp
Graphics.freeze
$game_map.setup($game_temp.warp)
$game_player.center($game_player.x, $game_player.y)
$game_temp.warp = false
$scene.warp_spriteset_refresh
$game_map.autoplay
Warp.transition
else
slipknot_warp_upd
end
end
#--------------------------------------------------------------------------
# * Warp
#--------------------------------------------------------------------------
def warp
return true if ! $scene.is_a?(Scene_Map) || ! Warp.can?
map = $game_map.map_id
Graphics.freeze
$game_map.setup(Warp::Maps[map])
$game_player.center($game_player.x, $game_player.y)
$game_temp.warp = $game_map.passable?($game_player.x, $game_player.y, 0) ?
false : map
$game_variables[Warp::Variable] += 1 if Warp::Variable && ! $game_temp.warp
$scene.warp_spriteset_refresh
Warp.transition
$game_map.autoplay
return true
end
end
#============================================================
# ** Scene_Map
#============================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Warp: Spriteset Refresh
#--------------------------------------------------------------------------
def warp_spriteset_refresh
@spriteset.dispose
@spriteset = Spriteset_Map.new
end
end
It teleports to the same x and y on a different map, and returns to the previous map if the hero's standing on an impassible area.
Edit: Whoops, I was requesting a similar script for VX, with this script as reference, as this is an XP script o.O It wasn't clear enough o.O