Worldslayer608
ಥдಥ
- 857
- Posts
- 17
- Years
- Age 35
- San Diego
- Seen Nov 10, 2020
Using the Zoom Function on Back Sprites [ANSWERED]
So I am trying to use the zoom function to double the size of my back sprites in battle. But I am not having any luck getting them to zoom. Here is what I am adding:
I have added the code to the following section in PokeBattle_ActualScene thinking it was correct, and it did not manage to do anything at all:
After that did not work, I removed it from the above section and then put it in this section of PokeBattle_ActualScene:
This still did not work, so I tried adding it to both and got nothing once again.
So I am wondering what I am missing for this to work. Anyone able to help me out?
EDIT
So for those wondering the solution to this you can adjust this section under class PokeballPlayerSendOutAnimation in PokeBattle_ActualScene:
Resolved thanks to Venom12, I have added the solution to the original post.
So I am trying to use the zoom function to double the size of my back sprites in battle. But I am not having any luck getting them to zoom. Here is what I am adding:
Code:
[COLOR="Green"]#ADDED[/COLOR]
@sprites["pokemon0"].zoom_x=2
[COLOR="Green"]#ADDED[/COLOR]
@sprites["pokemon0"].zoom_y=2
I have added the code to the following section in PokeBattle_ActualScene thinking it was correct, and it did not manage to do anything at all:
Code:
@sprites[[COLOR="Purple"]"pokemon0"[/COLOR]]=PokemonBattlerSprite.new(battle.doublebattle,[COLOR="DarkRed"]0[/COLOR],@viewport)
@sprites[[COLOR="purple"]"pokemon0"[/COLOR]].z=[COLOR="DarkRed"]21[/COLOR]
[COLOR="green"]#ADDED[/COLOR]
@sprites[[COLOR="purple"]"pokemon0"[/COLOR]].zoom_x=[COLOR="DarkRed"]2[/COLOR]
[COLOR="Green"]#ADDED[/COLOR]
@sprites[[COLOR="purple"]"pokemon0"[/COLOR]].zoom_y=[COLOR="DarkRed"]2[/COLOR]
After that did not work, I removed it from the above section and then put it in this section of PokeBattle_ActualScene:
Code:
@sprites[[COLOR="Purple"]"pokemon#{battlerindex}"[/COLOR]].setPokemonBitmap(pkmn,[COLOR="Blue"]true[/COLOR])
sendout=PokeballPlayerSendOutAnimation.new(@sprites["[COLOR="purple"]pokemon#{battlerindex}"[/COLOR]],
@sprites,@battle.battlers[battlerindex],@battle.doublebattle)
@playerpokemon=@sprites[[COLOR="purple"]"pokemon0"[/COLOR]]
[COLOR="Green"]#ADDED[/COLOR]
@sprites[[COLOR="Purple"]"pokemon0"[/COLOR]].zoom_x=[COLOR="DarkRed"]2[/COLOR]
[COLOR="green"]#ADDED[/COLOR]
@sprites[[COLOR="purple"]"pokemon0"[/COLOR]].zoom_y=[COLOR="DarkRed"]2[/COLOR]
@playerpokemon2=@sprites[[COLOR="purple"]"pokemon2"[/COLOR]]
This still did not work, so I tried adding it to both and got nothing once again.
So I am wondering what I am missing for this to work. Anyone able to help me out?
EDIT
So for those wondering the solution to this you can adjust this section under class PokeballPlayerSendOutAnimation in PokeBattle_ActualScene:
Code:
[COLOR="blue"]if[/COLOR] @frame>[COLOR="DarkRed"]5[/COLOR] && @PokemonBattlerSprite.zoom_x<[COLOR="DarkRed"]2.0[/COLOR]
@PokemonBattlerSprite.zoom_x+=[COLOR="DarkRed"]0.2[/COLOR]
@PokemonBattlerSprite.zoom_y+=[COLOR="DarkRed"]0.2[/COLOR]
@PokemonBattlerSprite.zoom_x=[COLOR="DarkRed"]2.0[/COLOR] [COLOR="Blue"]if[/COLOR] @PokemonBattlerSprite.zoom_x > [COLOR="DarkRed"]2.0[/COLOR]
@PokemonBattlerSprite.zoom_y=[COLOR="DarkRed"]2.0[/COLOR] [COLOR="blue"]if[/COLOR] @PokemonBattlerSprite.zoom_y > [COLOR="DarkRed"]2.0[/COLOR]
pbSpriteSetCenter(@PokemonBattlerSprite,@spritex,[COLOR="DarkRed"]0[/COLOR])
@PokemonBattlerSprite.y=@spritey+(@endspritey-@spritey)*@PokemonBattlerSprite.zoom_y
[COLOR="Blue"]end[/COLOR]
[COLOR="blue"]if[/COLOR] @PokemonBattlerSprite.tone.gray<=0 && @PokemonBattlerSprite.zoom_x>=[COLOR="DarkRed"]2.0[/COLOR]
Resolved thanks to Venom12, I have added the solution to the original post.
Last edited: