YesNoOk
avatar

Add an extra animation (Read 2587 times)

Started by Charles_2011, April 25, 2023, 01:39:44 am
Share this topic:
Add an extra animation
#1  April 25, 2023, 01:39:44 am
  • ***
    • Peru
Hello.

I would like to add an extra animation to this technique, like an effect that executes at the same time:



This is the code:

Code:
[Statedef 1005]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
poweradd = 0
juggle = 0
sprpriority = 3
anim = 2000

[State 1000, VelSet]
type = VelSet
trigger1 = 1
x = root, Vel X
y = root, Pos Y

[State 1000, BindToRoot]
type = BindToRoot
trigger1 = 1
ignorehitpause = 1

[State 1000, Explod]
type = ChangeAnim
trigger1 = root, AnimElemTime(11) < 0
value = 2000+root,AnimElemNo(0)-3

[State 1005, DestroySelf]
type = DestroySelf
trigger1 = root, AnimElemTime(11) >= 0
trigger2 = root, MoveType = H
trigger3 = root, StateNo != 1000

Animations:

Code:
[Begin Action 2000]
10000,0, -8,0, 3, , A1


[Begin Action 2001]
10000,1, 0,0, 2, , A1


[Begin Action 2002]
10000,2, 16,0, 1, , A1


[Begin Action 2003]
10000,3, 20,0, 2, , A1


[Begin Action 2004]
10000,4, 16,0, 1, , A1


[Begin Action 2005]
10000,5, 0,0, 2, , A1


[Begin Action 2006]
10000,6, -8,0, 2, , A1


[Begin Action 2007]
10000,7, -8,0, 1, , A1


[Begin Action 2008]
10000,8, -8,0, 3, , A1

What do I have to add? Could you help me, please?
Re: Add an extra animation
#2  April 25, 2023, 05:10:53 pm
  • ****
so it's a explod

so the explod should show if the move hit or not?
Re: Add an extra animation
#3  April 25, 2023, 05:37:37 pm
  • ***
    • Peru
Hello beterhans.

without hit, I want to see an extra animation at the same time of that technique.
Re: Add an extra animation
#4  April 28, 2023, 01:00:37 am
  • ***
    • Peru
Hello again.

I was making some test and I found that there are codes that I didnĀ“t mention:

Code:
;===============================================================================
;                                    SPECIALS
;===============================================================================

;----------------------------------------------------------------------------------
; Flash Chop
[Statedef 1000]
type = S
movetype = A
physics = N
ctrl = 0
sprpriority = 2
velset = 0,0
poweradd = 70*(1000+Var(40))/1000*IfElse((Var(29)||Var(30)),0,1)
juggle = 0
facep2 = 1

[State 1000, VarSet]
type = VarSet
triggerall = !AILevel
trigger1 = Time = 0
var(22) = ifElse((helper(10371), var(0)&((2**2)|(2**9))),2,ifElse((helper(10371), var(0)&((2**1)|(2**8))),1,ifElse((helper(10371), var(0)&((2**0)|(2**7))),0,ifElse((helper(10371), var(1)&((2**2)|(2**9))),2,ifElse((helper(10371), var(1)&((2**1)|(2**8))),1,0)))))
[State 1200, VarSet]
type = VarSet
triggerall = AILevel && NumHelper(10003)
trigger1 = Time = 0
var(22) = ifElse(helper(10003), Var(15), 2, ifElse(Var(30), 1, random%3))

[State 1000, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 1000+Var(22)*10

[State 1000, VelSet]
type = VelSet
trigger1 = AnimElemTime(3) = 0
x = (4+Var(22)*2)*(5.0/4.0)
[State 1020, VelSet]
type = VelSet
trigger1 = AnimElemTime(7) = 0
x = 0

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 3
value = S8+Var(24),7
channel = 0

[State 1000, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 5
value = S0,2
channel = 1

[State 1100, ReversalDef]
type = ReversalDef
trigger1 = AnimElem = 6  || AnimElem = 7
reversal.attr = SCA, NP, SP, HP
pausetime = 0,0
sparkno = S-1
sparkxy = 9999,9999
hitsound = S9000,0
;ignorehitpause =
;persistent =

[State 220, 1]
type = HitDef
triggerall = P2StateNo != 5040 && ((FVar(19) != 0 && FVar(19) != 256) || Var(30) || P2StateType != A || P2MoveType != H || (FVar(13) && (PrevStateNo = [3000,3999])))
triggerall = e||(fvar(18) := 0)
triggerall = e||(var(49) := (12+Var(22))*!Var(30))
trigger1 = AnimElem = 6  || AnimElem = 7
attr = S, SA
damage = floor(ifElse(((84+Var(22)*7)*FVar(10))<7,7,((84+Var(22)*7)*FVar(10)))),floor(ifElse(((84+Var(22)*7)/8*FVar(10))<7,7,((84+Var(22)*7)/8*FVar(10))))
animtype = Heavy
air.animtype = Back
fall.animtype = Back
guardflag = MA
hitflag = MAFP
priority = 6, Hit
pausetime = ceil(11*(2-(Var(30)>0))/2),ceil(11*(2-(Var(30)>0))/2)
sparkno = S8210+(random%8)
guard.sparkno = S8105
sparkxy = ceil(fvar(26):=-20),ceil(fvar(27):=-77)
hitsound = S3,2
guardsound = S5,0
ground.type = Low
ground.slidetime = ifElse(Var(22)=2,28,18)
ground.hittime  = ifElse(Var(22)=2,28,18)
ground.velocity = -8.125
guard.velocity = -8.125
guard.ctrltime = ifElse(Var(22)=2,28,18)
air.type = Low
air.velocity = (fvar(4):=-6),(fvar(5):=-3.671875*(5.0/4.0))
airguard.velocity = -6,-.75
air.hittime = ifElse(Var(22)=2,28,18)
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
getpower = ifElse(Var(51),70,143)*(1000+Var(40))/1000*IfElse((Var(29)||Var(30)),0,1),35*(1000+Var(41))/1000*IfElse((Var(29)||Var(30)),0,1)
givepower = 35,35
palfx.time = 12*Var(21)
palfx.add = 255,255,255
palfx.mul = 128,128,128
yaccel = 0.328125*(25.0/16.0)
air.fall = 1
fall.recover = 0
envshake.time = 10
envshake.ampl = 3
forcestand = 1
p2facing = -1
ID = 1000
persistent = 0

[State 1300, 0]
type = Helper
triggerall = !NumHelper(1005)
trigger1 = AnimElemTime(3) = 1
helpertype = normal
name = "Effect"
id = 1005
facing = 1
pos = 0,0
postype = p1
stateno = 1005
keyctrl = 0
size.xscale = Const(Size.XScale)
size.yscale = Const(Size.YScale)
sprpriority = 3
ownpal = 1

[State 1000, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;----------------------------------------------------------------------------------
; GTFO
[Statedef 1005]
type = S
movetype = A
physics = N
ctrl = 0
velset = 0,0
poweradd = 0
juggle = 0
sprpriority = 3
anim = 2000

[State 1000, VelSet]
type = VelSet
trigger1 = 1
x = root, Vel X
y = root, Pos Y

[State 1000, BindToRoot]
type = BindToRoot
trigger1 = 1
ignorehitpause = 1

[State 1000, Explod]
type = ChangeAnim
trigger1 = root, AnimElemTime(11) < 0
value = 2000+root,AnimElemNo(0)-3

[State 1005, DestroySelf]
type = DestroySelf
trigger1 = root, AnimElemTime(11) >= 0
trigger2 = root, MoveType = H
trigger3 = root, StateNo != 1000

I hope this could be useful.