- 26
- Posts
- 7
- Years
- Seen Dec 19, 2018
Hi. So recently I've started trying to create my own animations in the animation editor, but creating one for every move is extremely time consuming. I currently have EBS downloaded and working perfectly but I noticed that with script 07 all of the animations overrides the Essentials Animations.
I want to allow it so it will play the EBS default animations for moves that don't have animations completed in the editor, but will still play animations for moves that are defined. I know it's possible because I've seen other projects use EBS preset move animations as well as custom Essentials Animations for certain moves. Could anyone help me out with this?
Here's the section that I'm pretty sure is responsible for everything I'm talking about:
I want to allow it so it will play the EBS default animations for moves that don't have animations completed in the editor, but will still play animations for moves that are defined. I know it's possible because I've seen other projects use EBS preset move animations as well as custom Essentials Animations for certain moves. Could anyone help me out with this?
Here's the section that I'm pretty sure is responsible for everything I'm talking about:
Code:
class PokeBattle_Scene
attr_accessor :animationCount
#-----------------------------------------------------------------------------
# Main animation handling core
#-----------------------------------------------------------------------------
def pbAnimation(moveid,user,target,hitnum=0)
# for hitnum, 1 is the charging animation, 0 is the damage animation
return if !moveid
# move information
movedata = PBMoveData.new(moveid)
move = PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(moveid))
numhits = user.thisMoveHits
multihit = !numhits.nil? ? (numhits > @animationCount) : false
@animationCount+=1
if numhits.nil?
@animationCount=1
elsif @animationCount > numhits
@animationCount=1
end
multitarget = false
multitarget = move.target if (move.target==PBTargets::AllOpposing || move.target==PBTargets::AllNonUsers)
target = user if !target
# clears the current UI
clearMessageWindow
isVisible=[false,false,false,false]
for i in 0...4
if @sprites["battlebox#{i}"]
isVisible[i]=@sprites["battlebox#{i}"].visible
@sprites["battlebox#{i}"].visible=false
end
end
# Substitute animation
if @sprites["pokemon#{user.index}"] && @battle.battlescene
subbed = @sprites["pokemon#{user.index}"].isSub
self.setSubstitute(user.index,false) if subbed
end
# gets move animation def name
anm = "pbMoveAnimationSpecific"+sprintf("%03d",moveid)
handled = false
if @battle.battlescene
# checks if def for specific move exists, and then plays it
if !handled && eval("defined?(#{anm})")
handled = eval("#{anm}(#{user.index},#{target.index},#{hitnum},#{multihit})")
end
# in case people want to use the old animation player
if REPLACEMISSINGANIM && !handled
animid=pbFindAnimation(moveid,user.index,hitnum)
return if !animid
anim=animid[0]
animations=load_data("Data/PkmnAnimations.rxdata")
name=PBMoves.getName(moveid)
pbSaveShadows {
if animid[1] # On opposing side and using OppMove animation
pbAnimationCore(animations[anim],target,user,true,name)
else # On player's side, and/or using Move animation
pbAnimationCore(animations[anim],user,target,false,name)
end
}
handled = true
end
# decides which global move animation to play, if any
if !handled
handled = playGlobalMoveAnimation(move.type,user.index,target.index,multitarget,multihit,movedata.category,hitnum)
end
# if all above failed, plays the move animation for Tackle
if !handled
pbMoveAnimationSpecific303(user.index,target.index,0,multihit)
end
end
# Change form to transformed version
if PBMoveData.new(moveid).function==0x69 && user && target # Transform
pbChangePokemon(user,target.pokemon)
end
# restores cleared UI
for i in 0...4
if @sprites["battlebox#{i}"]
@sprites["battlebox#{i}"].visible=true if isVisible[i]
end
end
self.afterAnim = true
end
Last edited: