Based on this TUT:
http://pokemonessentials.wikia.com/wiki/Tutorial:Last_sent_out_pokemon_BGM
I decided to make a better version so you do not have to put a switch each time for a gymleader.
First thing you want to do is name the event "SpecialTrainer",
then you have to replace this:
With this:
Then in pokemonFeild
add this:
under:
change:
to:
And done, you can change the switch, and music to what ever you want.
http://pokemonessentials.wikia.com/wiki/Tutorial:Last_sent_out_pokemon_BGM
I decided to make a better version so you do not have to put a switch each time for a gymleader.
First thing you want to do is name the event "SpecialTrainer",
then you have to replace this:
Code:
def pbSendOut(index,pokemon)
pbSetSeen(pokemon)
@peer.pbOnEnteringBattle(self,pokemon)
if pbIsOpposing?(index)
@scene.pbTrainerSendOut(index,pokemon)
else
@scene.pbSendOut(index,pokemon)
end
end
Code:
def pbSendOut(index,pokemon)
pbSetSeen(pokemon)
@peer.pbOnEnteringBattle(self,pokemon)
if pbIsOpposing?(index)
@scene.pbTrainerSendOut(index,pokemon)
if $game_switches[112]==true && pbPokemonCount(@party2)<2
pbBGMPlay("PokeCenter",100,100)
end
else
@scene.pbSendOut(index,pokemon)
end
end
add this:
Code:
Events.onSpritesetCreate+=proc{|sender,e|
spriteset=e[0] # Spriteset being created
viewport=e[1] # Viewport used for tilemap and characters
map=spriteset.map # Map associated with the spriteset (not necessarily the current map).
for i in map.events.keys
if map.events[i].name=="SpecialTrainer"
$game_switches[112]=true
elsif map.events[i].name!="SpecialTrainer"
$game_switches[112]=false
end
end
}
Code:
Events.onSpritesetCreate+=proc{|sender,e|
spriteset=e[0] # Spriteset being created
viewport=e[1] # Viewport used for tilemap and characters
map=spriteset.map # Map associated with the spriteset (not necessarily the current map).
for i in map.events.keys
if map.events[i].name=="OutdoorLight"
spriteset.addUserSprite(LightEffect_DayNight.new(map.events[i],map))
elsif map.events[i].name=="Light"
spriteset.addUserSprite(LightEffect_Basic.new(map.events[i],map))
end
end
spriteset.addUserSprite(Particle_Engine.new(viewport,map))
}
Code:
def pbEndBattle(result)
@abortable=false
pbShowWindow(BLANK)
# Fade out all sprites
pbBGMFade(1.0)
pbFadeOutAndHide(@sprites)
pbDisposeSprites
end
Code:
def pbEndBattle(result)
@abortable=false
pbShowWindow(BLANK)
# Fade out all sprites
pbBGMFade(1.0)
pbFadeOutAndHide(@sprites)
pbDisposeSprites
$game_switches[112]=false
end
Last edited: