#==============================================================================
# ** Fade Warp (Fondu t?l?port)
#------------------------------------------------------------------------------
# Trebor777
# 2.0
# 18/05/2006
#------------------------------------------------------------------------------
# G?n?re automatiquement un fondu sur ?cran noir, pour les t?l?portations vers
# une map diff?rente de l'actuelle.
# Automatically Create a Black Screen's fade, for player transfer to a different
# map from the current one.
#==============================================================================
#==============================================================================
# ** Interpreter (part 2)
#------------------------------------------------------------------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# * Event Command Execution
#--------------------------------------------------------------------------
$fade_wait = 30 #if =0, d?sactivate the effect.
$fwait = 30
#--------------------------------------------------------------------------
alias fade_warp_execute_command execute_command
def execute_command
# If last to arrive for list of event commands
if @index >= @list.size - 1
# End event
@a_fait = nil #flag reset
command_end
# Continue
return true
end
parameters = @list[@index].parameters
id=$game_map.map_id #id of the current map
# if the command is "transfer player"
if @list[@index].code==201 and @a_fait==nil
# if destination's ID, is different from the current map's one, :
if (parameters[0]==0 and parameters[1]!=id) or (parameters[0]!=0 and $game_variables[parameters[1]]!=id)
# Change screen tone to black
black_tone=RPG::EventCommand.new(223,0,[Tone.new(-255,-255,-255,0),$fade_wait])
# Wait
wait=RPG::EventCommand.new(106,0,[$fwait])
# Change screen tone to Normal
no_tone=RPG::EventCommand.new(223,0,[Tone.new(0,0,0,0),$fade_wait])
# insert of the 2 first commands before the transfer player one
if $fade_wait>0
@list.insert(0,black_tone,wait)
# insert of the last after the transfer player one
@list.insert(@list.size - 1,no_tone)
# flag in order to mark the execution
end
@a_fait = true
end
end
fade_warp_execute_command
end
end