- 3
- Posts
- 10
- Years
- Seen Jun 12, 2021
I'm very new to this forum, and I'm not aware if this has been asked.
I recently wanted to script in some during battle effects as well as moves, I'm currently working on Moxie, as it's a least concern priority to get working for most people.
I would assume I would have to put the script code somewhere between lines 2522 and 2532 in the PokeBattle_ActualScene script?
I recently wanted to script in some during battle effects as well as moves, I'm currently working on Moxie, as it's a least concern priority to get working for most people.
I would assume I would have to put the script code somewhere between lines 2522 and 2532 in the PokeBattle_ActualScene script?
Code:
# This method is called whenever a Pokémon faints.
def pbFainted(pkmn)
frames=pbCryFrameLength(pkmn.pokemon)
pbPlayCry(pkmn.pokemon)
frames.times do
pbGraphicsUpdate
pbInputUpdate
end
@sprites["shadow#{pkmn.index}"].visible=false
pkmnsprite=@sprites["pokemon#{pkmn.index}"]
pkmnsprite.visible=false
if @battle.pbIsOpposing?(pkmn.index)
ycoord=(@sprites["battler0"].visible && @battle.doublebattle) ? 118 : 130
tempvp=Viewport.new(0,0,Graphics.width,ycoord+@foeyoffset)
else
tempvp=Viewport.new(0,0,Graphics.width,224+@traineryoffset)
end
[email protected]
tempsprite=SpriteWrapper.new(tempvp)
tempsprite.x=pkmnsprite.x
tempsprite.y=pkmnsprite.y
tempsprite.bitmap=pkmnsprite.bitmap
tempsprite.visible=true
pbSEPlay("faint")
20.times do
tempsprite.y+=8
pbGraphicsUpdate
pbInputUpdate
end
[B]# I assume I have to insert the code here?[/B]
tempsprite.dispose
tempvp.dispose
8.times do
@sprites["battler#{pkmn.index}"].opacity-=32
pbGraphicsUpdate
pbInputUpdate
end
@sprites["battler#{pkmn.index}"].visible=false
pkmn.pbResetForm
end