- 115
- Posts
- 9
- Years
- Seen Nov 17, 2023
Essentials comes with these transition animations that play when a battle starts:
I'm having an issue where my game isn't playing these animations, for wild battles or trainer battles. Which script controls when these animations show up? And what part of the script could be preventing these animations from showing?
UPDATE:
So I found the section of the PField script that handles transitions, but I couldn't figure out what was preventing the transition animations from playing. I know that it has something to do with this section of code here...
...specifically the Graphics.transition part. But I'm not sure what I need to do to get the animations working. Right now when I enter a battle the screen just flashes 3 times and then goes black (instead of playing the animation) until the battle scene opens up.
Spoiler:
I'm having an issue where my game isn't playing these animations, for wild battles or trainer battles. Which script controls when these animations show up? And what part of the script could be preventing these animations from showing?
UPDATE:
So I found the section of the PField script that handles transitions, but I couldn't figure out what was preventing the transition animations from playing. I know that it has something to do with this section of code here...
Code:
if !handled
if Sprite.method_defined?(:wave_amp) && rand(15)==0
viewport.color=Color.new(0,0,0,255)
sprite = Sprite.new
bitmap=Graphics.snap_to_bitmap
bm=bitmap.clone
sprite.z=99999
sprite.bitmap = bm
sprite.wave_speed=500
for i in 0..25
sprite.opacity-=10
sprite.wave_amp+=60
sprite.update
sprite.wave_speed+=30
2.times do
Graphics.update
end
end
bitmap.dispose
bm.dispose
sprite.dispose
elsif Bitmap.method_defined?(:radial_blur) && rand(15)==0
viewport.color=Color.new(0,0,0,255)
sprite = Sprite.new
bitmap=Graphics.snap_to_bitmap
bm=bitmap.clone
sprite.z=99999
sprite.bitmap = bm
for i in 0..15
bm.radial_blur(i,2)
sprite.opacity-=15
2.times do
Graphics.update
end
end
bitmap.dispose
bm.dispose
sprite.dispose
elsif rand(10)==0 # Custom transition method
scroll=["ScrollDown","ScrollLeft","ScrollRight","ScrollUp",
"ScrollDownRight","ScrollDownLeft","ScrollUpRight","ScrollUpLeft"]
Graphics.freeze
viewport.color=Color.new(0,0,0,255)
Graphics.transition(50,sprintf("Graphics/Transitions/%s",scroll[rand(scroll.length)]))
else
transitions=[
# Transitions with graphic files
"021-Normal01","022-Normal02",
"Battle","battle1","battle2","battle3","battle4",
"computertr","computertrclose",
"hexatr","hexatrc","hexatzr",
"Image1","Image2","Image3","Image4",
# Custom transition methods
"Splash","Random_stripe_v","Random_stripe_h",
"RotatingPieces","ShrinkingPieces",
"BreakingGlass","Mosaic","zoomin"
]
rnd=rand(transitions.length)
#Graphics.freeze
viewport.color=Color.new(0,0,0,255)
Graphics.transition(40,sprintf("Graphics/Transitions/%s",transitions[rnd]))
end
5.times do
Graphics.update
Input.update
pbUpdateSceneMap
end
end
pbPushFade
yield if block_given?
pbPopFade
if $game_system && $game_system.is_a?(Game_System)
$game_system.bgm_resume(playingBGM)
$game_system.bgs_resume(playingBGS)
end
$PokemonGlobal.nextBattleBGM=nil
$PokemonGlobal.nextBattleME=nil
$PokemonGlobal.nextBattleBack=nil
$PokemonEncounters.clearStepCount
for j in 0..17
viewport.color=Color.new(0,0,0,(17-j)*15)
Graphics.update
Input.update
pbUpdateSceneMap
end
viewport.dispose
end
Last edited: