Thread: [Question] Animated Battlers
View Single Post
  #1    
Old August 14th, 2013 (11:46 PM).
Kaito123 Kaito123 is offline
 
Join Date: Jul 2012
Gender: Male
Posts: 42
Hello!

If I put a animated png for all the Battler, the Animation often stops in the Battle.

I hav find this Script on the wiki: Tutorial:Animating battle sprites

How is that Tutorial? Is the Animation every time in Battle and how must I do, when I want more frames to use?

I know I must add this (for example):

Spoiler:
Code:
def pbLoadPokemonBitmap3(pokemon, back=false)
return pbLoadPokemonBitmapSpecies3(pokemon,pokemon.species,back)
end

def pbLoadPokemonBitmapSpecies3(pokemon, species, back=false)
if pokemon.egg?
return BitmapCache.load_bitmap(sprintf("Graphics/Pictures/egg"))
end
ret=nil
bitmapFileName=pbResolveBitmap(sprintf("Graphics/Battlers/thirdframe/%03d%s%s%s_%d",species,
pokemon.gender==1 ? "f" : "",
pokemon.isShiny? ? "s" : "",
back ? "b" : "",(pokemon.form rescue 0)))
bitmapFileName=pbResolveBitmap(sprintf("Graphics/Battlers/thirdframe/%03d%s%s_%d",species,
pokemon.isShiny? ? "s" : "",
back ? "b" : "",(pokemon.form rescue 0))) if !bitmapFileName
bitmapFileName=pbResolveBitmap(sprintf("Graphics/Battlers/thirdframe/%03d%s%s%s",species,
pokemon.gender==1 ? "f" : "",
pokemon.isShiny? ? "s" : "",
back ? "b" : "")) if !bitmapFileName
bitmapFileName=pbResolveBitmap(sprintf("Graphics/Battlers/thirdframe/%03d%s%s",species,
pokemon.isShiny? ? "s" : "",
back ? "b" : "")) if !bitmapFileName
# Alter bitmap if supported
alterBitmap=(MultipleForms.getFunction(species,"alterBitmap") rescue nil)
if bitmapFileName && alterBitmap
animatedBitmap=BitmapCache.load_bitmap(bitmapFileName)
copiedBitmap=animatedBitmap.copy
animatedBitmap.dispose
copiedBitmap.each {|bitmap|
alterBitmap.call(pokemon,bitmap)
}
ret=copiedBitmap
elsif bitmapFileName
ret=BitmapCache.load_bitmap(bitmapFileName)
end
return ret
end


but must and how I do something in this?

Spoiler:
Code:
if !@battle.opponent
pokemon = @battle.party2[0]
@sprites["pokemon1"].bitmap = pbLoadPokemonBitmap2(pokemon,false)
pbPlayCry(@battle.party2[0])
pbWait(30)
@sprites["pokemon1"].bitmap = pbLoadPokemonBitmap(pokemon,false)
if @battle.party2[0].isShiny?
pbCommonAnimation("Shiny",@battle.battlers[1],nil)
end
if @battle.party2.length==2
pokemon2 = @battle.party2[1]
@sprites["pokemon3"].bitmap = pbLoadPokemonBitmap2(pokemon2,false)
pbPlayCry(@battle.party2[1])
pbWait(30)
@sprites["pokemon3"].bitmap = pbLoadPokemonBitmap(pokemon2,false)
if @battle.party2[1].isShiny?
pbCommonAnimation("Shiny",@battle.battlers[3],nil)
end
end
end
Code:
@sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap2(pkmn,false)
pkmnwav=sprintf("Audio/SE/%03dCry",pkmn.species)
Audio.se_play(pkmnwav,90,100)
pbWait(30)
  @sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap(pkmn,false)
Code:
@sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap2(pkmn,true)
pkmnwav=sprintf("Audio/SE/%03dCry",pkmn.species)
Audio.se_play(pkmnwav,100,100)
pbWait(30)
@sprites["pokemon#{battlerindex}"].bitmap=pbLoadPokemonBitmap(pkmn,true)
Reply With Quote