YesNoOk
avatar

exchange hit box (Read 205 times)

Started by mugenfan89, March 04, 2021, 06:07:17 PM
Share this topic:
exchange hit box
#1  March 04, 2021, 06:07:17 PM
  • avatar
  • *
    • USA
Hi I would like to exchange the hit boxes between two groups of anims, the anim 1011 is usually the one which hits the opponent but I would like to have anim 498 to do the job, so how do I get this done?

Here is the code, thanks in advance.
;---------------------

[Statedef 1900]     ;erdeschossen
type    = S
movetype= A
physics = S
juggle  = 2
velset = 0,0
anim = 1010
ctrl = 0

[State 10000, open]
type = PlaySnd
trigger1 = AnimElem = 7
value = 4, 21

[State 1000, 0.1]
type = Posset
trigger1 = Pos Y != 0
trigger1 = time = 0
Y = var(57)

[State 1601, explosion]
type = Envshake
trigger1 = animelem = 6
time = 12
freq = 70
ampl = 7

[State 9251,misil]
type = Helper
trigger1 = animelem = 7
ID = 815
postype = p1
pos = 0,0
stateno = 1510
ownpal = 1
size.xscale = 0.6
size.yscale = 0.6

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

;---------------------------
[Statedef 1510]     ;un misil
type    = S
movetype= A
physics = S
juggle  = 2
velset = 6,0
anim = 1011--------------------------------------This one here-------------------------------------

[State 0, AngleDraw]
type = Assertspecial
trigger1 = 1
flag = noshadow
time = 9999
ignorehitpause = 1

[State 10000, rakieta]
type = PlaySnd
trigger1 = time%12 = 4
value = 50, 0
volume = 30

[State 10000, rakieta]
type = envshake
trigger1 = time%12 = 4
time = 6
freq = 70
ampl = 5

[State 10000, rakieta]
type = veladd
trigger1 = 1
X = 6

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = 498--------------------------------------------------------and this one here---------------------------------
pos = 6,0
postype = p1
sprpriority = -2
facing = 1-2*(random%2)
bindtime = 1; -1 forever
random = 0,2
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 0.7, ifelse(random>500,1,.7)
sprpriority = -6
ontop = 0
ownpal = 1
persistent=4
trans=add

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = f34
pos = 10,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-3
random = 60,50
ownpal = 1

[State 1601, explosion]
type = Explod
trigger1 = time%12 = 4
anim = 1005 + random%3
pos = 4,0
postype = p1
sprpriority = -2
facing = 1-2*(random%2)
vfacing = 1-2*(random%2)
bindtime = 1; -1 forever
random = 0,2
removetime = -2;"-2" odin raz; "-1" forever
pausemovetime = 0
scale = 1, ifelse(random>500,1,.7)
sprpriority = -6
ontop = 0
ownpal = 1
persistent=4
trans=add

[State 0, always]
type = Explod
trigger1 =time=0
anim = 1904
ID = 12001
pos = 0,4
postype = p1;  p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = -1; -1 forever
scale = .8,.5
sprpriority = -1
ownpal = 1
removeongethit = 0
trans=add



[State 1601, Hit]
type = HitDef
trigger1 = !movecontact
attr = S, HP
pausetime = 0,2
damage    = 199, 98
animtype = back
air.animtype = Back
guardflag = L
sparkno = -1
guard.sparkno = -1
hitsound   = 5,0
guardsound = 5,0
ground.type = High
ground.slidetime = 20
ground.hittime  = 20
ground.velocity = 0,-12
air.velocity = 0,-8
air.fall = 1
fall.recover = 0
air.juggle = 3
yaccel = .45
kill       = root, Var(9) = 0
fall.kill  = root, Var(9) = 0
guard.kill = root, Var(9) = 0

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 1601, explosion]
type = Explod
trigger1 = movehit = 1
anim = f30 + random%2
pos = 0,0
postype = p1
sprpriority = -3 + 6*(random%2)
vel = 0,-6
random = 60,50
ownpal = 1
persistent = 0
removetime = 44

[State 10000, rakieta]
type = destroyself
trigger1 = time = 72

[Statedef 5120]
type    = L
movetype= I
physics = N
anim = 5120
ctrl = 0

[State 810, reset]
type = nothitby
trigger1 = time = 0
value = SCA,NA,SA
time = 1

[State 1001, combo receive]
type = selfstate
triggerall = abs(p2dist x) < 60 || abs(p2bodydist x) < 12
trigger1 = p2stateno = 24 && numexplod(24) = 0; not sure
value = 0
ctrl = 1

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 12
value = C

[State 810, Grab Sound]
type = Statetypeset
trigger1 = time = 20
trigger2 = AnimTime = 0 && p2dist x < -20
value = S


[State 810, Grab Sound]
type = ctrlset
trigger1 = time = 20 && life > 1
trigger1 = p2dist x > 0
value = 1

[State 810, Grab Sound]
type = assertspecial
trigger1 = time >= 12
flag = nowalk

[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;-