Hola, para mi proyecto necesito el Following Character, tengo el script de la V3 que saqué de un pack, pero no se como activarlo. Este es el script:
#==============================================================================
# ? Config Script For Your Game Here
#==============================================================================
#==============================================================================
# ? Pokemon Following Character v3 By Help-14
#==============================================================================
class DependentEvents
#----------------------------------------------------------------------------
# - change_following_pokemon
# - It will run when you press A button
#----------------------------------------------------------------------------
def change_following_pokemon
if $game_variables[PFC_Variable]+1==$Trainer.party.length+1
$game_variables[PFC_Variable]=0
else
$game_variables[PFC_Variable]+=1
end
if $game_variables[PFC_Variable]==6
remove_sprite(true)
else
if $Trainer.party[$game_variables[PFC_Variable]].isShiny?
shiny=true
else
shiny=false
end
change_sprite($Trainer.party[$game_variables[PFC_Variable]].species, shiny, true)
end
end
def refresh_sprite
if $Trainer.party[$game_variables[PFC_Variable]].isShiny?
shiny=true
else
shiny=false
end
change_sprite($Trainer.party[$game_variables[PFC_Variable]].species, shiny, false)
end
#----------------------------------------------------------------------------
# - change_sprite(id, shiny, animation)
# - Example, to change sprite to shiny lugia with animation:
# change_sprite(249, true, true)
# - If just change sprite:
# change_sprite(249)
#----------------------------------------------------------------------------
def change_sprite(id, shiny=nil, animation=nil)
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
if shiny==true
events[6]=sprintf("%03ds",id)
@realEvents.character_name=sprintf("%03ds",id)
else
events[6]=sprintf("%03d",id)
@realEvents.character_name=sprintf("%03d",id)
end
if animation==true
$scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents.x,@realEvents.y)
end
end
end
end
#----------------------------------------------------------------------------
# - remove_sprite(animation)
# - Example, to remove sprite with animation:
# remove_sprite(true)
# - If just remove sprite:
# remove_sprite
#----------------------------------------------------------------------------
def remove_sprite(animation=nil)
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
events[6]=sprintf("nil")
@realEvents.character_name=sprintf("nil")
if animation==true
$scene.spriteset.addUserAnimation(Animation_Come_In,@realEvents.x,@realEvents.y)
end
end
end
end
#----------------------------------------------------------------------------
# - check_surf(animation)
# - If current Pokemon is a water Pokemon, it is still following.
# - If current Pokemon is not a water Pokemon, remove sprite.
# - Require Water_Pokemon_Can_Surf = true to enable
#----------------------------------------------------------------------------
def check_surf(animation=nil)
if Water_Pokemon_Can_Surf == true
if $Trainer.party[$game_variables[PFC_Variable]].type1!="WATER" and
$Trainer.party[$game_variables[PFC_Variable]].type2!="WATER"
remove_sprite
end
else
remove_sprite
end
end
#----------------------------------------------------------------------------
# - talk_to_pokemon
# - It will run when you talk to Pokemon following
#----------------------------------------------------------------------------
def talk_to_pokemon
events=$PokemonGlobal.dependentEvents
for i in 0...events.length
if events && events[8]=="Dependent"
pos_x=@realEvents.x
pos_y=@realEvents.y
end
end
pbPlayCry($Trainer.party[$game_variables[PFC_Variable]].species)
if $game_variables[PFC_Variable]!=6
if $Trainer.party[$game_variables[PFC_Variable]].happiness>0 &&
$Trainer.party[$game_variables[PFC_Variable]].happiness<=50
$scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y)
elsif $Trainer.party[$game_variables[PFC_Variable]].happiness>50 &&
$Trainer.party[$game_variables[PFC_Variable]].happiness<=150
$scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y)
else
$scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y)
end
end
end
end
#----------------------------------------------------------------------------
# - Auto add Script to PokemonScreen, It'll change sprite when change Pokemon
#----------------------------------------------------------------------------
class PokemonScreen
alias pbps pbPokemonScreen
def pbPokemonScreen
pbps
$PokemonTemp.dependentEvents.refresh_sprite
end
end
#----------------------------------------------------------------------------
# - Auto add Script to PokemonStorageScreen, It'll change sprite when use PC
#----------------------------------------------------------------------------
class PokemonStorageScreen
alias pbs pbStore
def pbStore(selected,heldpoke)
pbs
$PokemonTemp.dependentEvents.refresh_sprite
end
end
#----------------------------------------------------------------------------
# - Auto add Script to PokemonEvolutionScene, It'll change sprite when evolution
#----------------------------------------------------------------------------
class PokemonEvolutionScene
alias pbe pbEvolution
def pbEvolution(cancancel=true)
pbe
$PokemonTemp.dependentEvents.refresh_sprite
end
end
#----------------------------------------------------------------------------
# - Auto add Script to Kernel.pbSurf, It'll check curent Pokemon when surf
#----------------------------------------------------------------------------
def Kernel.pbSurf
if $game_player.pbHasDependentEvents?
return false
end
if $DEBUG || $Trainer.badges
movefinder=Kernel.pbCheckMove(PBMoves::SURF)
if $DEBUG || movefinder
if Kernel.pbConfirmMessage(_INTL("The water is dyed a deep blue... Would you like to surf?"))
speciesname=!movefinder ? PBSpecies.getName(0) : movefinder.name
Kernel.pbMessage(_INTL("{1} used Surf!",speciesname))
pbHiddenMoveAnimation(movefinder)
surfbgm=pbGetMetadata(0,MetadataSurfBGM)
#Pokemon Following Character
$PokemonTemp.dependentEvents.remove_sprite(true)
if surfbgm
pbCueBGM(surfbgm,0.5)
end
Kernel.pbCancelVehicles
$PokemonGlobal.surfing=true
$PokemonEncounters.clearStepCount
Kernel.pbJumpToward
Kernel.pbUpdateVehicle
$game_player.check_event_trigger_here([1,2])
return true
end
end
end
return false
end
#----------------------------------------------------------------------------
# - Auto add Script to pbEndSurf, It'll show sprite after surf
#----------------------------------------------------------------------------
def pbEndSurf(xOffset,yOffset)
return false if !$PokemonGlobal.surfing
x=$game_player.x
y=$game_player.y
currentTag=$game_map.terrain_tag(x,y)
facingTag=Kernel.pbFacingTerrainTag
if pbIsWaterTag?(currentTag)&&!pbIsWaterTag?(facingTag)
if Kernel.pbJumpToward
Kernel.pbCancelVehicles
$game_map.autoplayAsCue
increase_steps
result=$game_player.check_event_trigger_here([1,2])
Kernel.pbOnStepTaken(result)
#Pokemon Following Character
refresh_sprite
end
return true
end
return false
end
ya tengo el equipo Pokémnon (los 6 pokes) pero no me siguen. Alguna idea de como activar el Following Character?