YesNoOk
avatar

Wall bounce not working (Read 829 times)

Started by BurningSoul, July 05, 2020, 11:01:17 pm
Share this topic:
Wall bounce not working
#1  July 05, 2020, 11:01:17 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
So I'm trying to code an Ex move that does wallbounce on animelem = 13 of animation but it doesnt work here's the code for both move and custom state,any help?

Code:
;------------------------------------------------------------------------------
;Heat Hurricane EX
[Statedef 1230]
type    = S
movetype = A
physics = S
poweradd = -500
velset = 0,0
ctrl = 0
facep2 = 1
anim = 1200

[State -3, ExSnd]
type = playsnd
trigger1 = !Time
value = 7, 6
ignorehitpause = 1

[State 1310, EX Flash]
type = VarSet
trigger1 = !Time
var(25) = 30

[State 1310, EX FX]
type = Explod
trigger1 = !Time
anim = 8210
sprPriority = 3
posType = p1
pos = -15, -71
scale = 0.5, 0.5
pauseMoveTime = -1
superMoveTime = -1
ownPal = 1


[State 1200, PlaySnd]
type = PlaySnd
trigger1 = AnimElem = 1
value = 62,0
channel = 0

[State 1200, PlaySnd]
type = PlaySND
trigger1 = AnimElem = 4
value = 62,1

[State 1200, PlaySnd]
type = PlaySND
trigger1 = AnimElem = 13
value = 62,2

[State 1200, Explod]
type = Explod
trigger1 = AnimElem = 13
anim = 22000
ID = 22000
pos = 0,0
postype = p1
ownpal = 1
bindtime = -1
removetime = -2
sprpriority = 4
removeongethit = 1
ignorehitpause = 0
scale = .5,.5

[State 1015, flames]
type = helper
triggerall = AnimElemtime(10) > 1
trigger1 = movehit && numtarget && numhelper(8150) < 1
trigger1 = HitPauseTime = 1
helpertype = normal
stateno = 8150
ID = 8150
name = "flames"
postype = p2
bindtime = 1000
ownpal = 1
facing = -1
size.ground.front = 0
size.ground.back = 0
ignorehitpause = 1

[State 1200, VelSet]
type = VelSet
trigger1 = Animelem = 4
x = 8

[State 1200, VelSet]
type = VelSet
trigger1 = Animelem = 6
x = 0

[State 1200, VelMul]
type = VelMul
trigger1 = Animelem = 4,>= 0
x = .95

[State 1200, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 5
trigger2 = AnimElem = 6
trigger2 = MoveContact = 0
attr = S, NA
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
guardflag = M
hitflag = MAF
damage    = 25
guardflag = MA
sparkno = s7020 + (random % 8)
guard.sparkno = s7001
sparkxy = -15, -65
hitsound = S4, 1
guardsound = S2,0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -2,0 
air.type = Low
air.velocity = -2 ,0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0

[State 1200, HitDef]
type = HitDef
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 9
attr = S, NA
animtype = Hard
air.animtype = Hard
fall.animtype = Hard
guardflag = M
hitflag = MAF
damage    = 25
guardflag = MA
sparkno = s7020 + (random % 8)
guard.sparkno = s7001
sparkxy = -15, -65
hitsound = S4, 1
guardsound = S2,0
ground.type = Low
ground.slidetime = 16
ground.hittime = 16
ground.velocity = -3,0
air.type = Low
air.velocity = -3,0
air.cornerpush.veloff = 0
ground.cornerpush.veloff = 0
guard.velocity = -10.52
guard.cornerpush.veloff = 0

;[State 226, 6]
;type = Width
;trigger1 = animelem = 13
;value = 15, 0
;ignorehitpause = 1

[State 1200, HitDef]
type = HitDef
trigger1 = !NumTarget(1190)
trigger1 = !var(16) && var(15) < 2
trigger1 = AnimElem = 13
attr = S, SA
damage    = 30
guardflag = M
pausetime = 12,12
sparkno = s7020 + (random % 8)
guard.sparkno = s7001
sparkxy = -10,-65
hitsound = S4, 3
guardsound = S2,0
ground.type = High
animtype = Diagup
air.animtype = Diagup
fall.animtype = Diagup
ground.type = High
air.type = Low
ground.hittime = 16
ground.slidetime = 16
guard.hittime = 16
air.hittime = 120
ground.velocity = -7, -5
ground.cornerpush.veloff = 0
guard.velocity = -16
guard.cornerpush.veloff = 0
air.velocity = -7, -5
air.cornerpush.veloff = 0
yaccel = .5
fall = 1
fall.recover = 0
forcestand = 1
id = 1190

[State 1131, TargetState];hits foe into wall
type = TargetState
trigger1 = MoveHit && NumTarget(1190)
trigger1 = (Target(1190), StateNo = 5000) || (Target(1190), StateNo = 5010) || (Target(1190), StateNo = 5020)
value = 1190
ID = 1190
ignoreHitPause = 1
 
[State 1200, ChangeState]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1



Code:
;======================<P2 Wall Bounce>===========================
;Being Launched
[StateDef 1190]
type = A
moveType = H
physics = N
velSet = 0,0

[State 1190, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5002

[State 1190, End]
type = ChangeState
trigger1 = HitShakeOver
value = 1191


;Heading Towards Wall
[StateDef 1191]
type = A
moveType = H
physics = N

[State 1191, HitVelSet]
type = HitVelSet
trigger1 = !Time
x = 1
y = 1

[State 1191, Gravity]
type = VelAdd
trigger1 = 1
y = GetHitVar(yAccel)

[State 1191, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
moveCamera = 0,1

[State 1191, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1191, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(SelfAnimExist(5052), 5052, 5030)

[State 1191, Bounce Off Wall]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 10 || FrontEdgeBodyDist <= 10
value = 1192

[State 1191, End]
type = SelfState
trigger1 = vel y > 0 && pos y >= 0
value = 5100


;Impacting Wall
[StateDef 1192]
type = A
moveType = H
physics = N

[State 1192, Turn]
type = Turn
trigger1 = !Time
trigger1 = FrontEdgeDist < BackEdgeDist

[State 1192, PosSet]
type = PosSet
trigger1 = 1
x = -160 * Facing

[State 1192, PosFreeze]
type = PosFreeze
trigger1 = 1
x = 1
y = 1

[State 1192, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
moveCamera = 0,1

[State 1192, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 1

[State 1192, ChangeAnim]
type = ChangeAnim
trigger1 = 1
value = 5010

[State 1192, Impact Sound]
type = PlaySnd
trigger1 = !Time
value = F7,0

[State 1192, End]
type = ChangeState
trigger1 = Time >= 4
value = 1193


;Bouncing Off Wall
[Statedef 1193]
type = A
moveType = H
physics = N

[State 1193, Turn]
type = Turn
trigger1 = !Time

[State 1193, Gravity]
type = VelAdd
trigger1 = 1
y = 0.48

[State 1193, VelSet]
type = VelSet
trigger1 = !Time
x = -2.85 ;-2.5
y = -8.5

[State 1193, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = ifElse(SelfAnimExist(5051), 5051, 5030)

[State 1193, ChangeAnim]
type = ChangeAnim
trigger1 = Anim = 5030 && !AnimTime
value = 5050

[State 1193, ChangeAnim]
type = ChangeAnim
trigger1 = vel y > -3 && Anim = 5051 && SelfAnimExist(5061)
value = 5061

[State 1193, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 1
moveCamera = 0,0

[State 1193, PlayerPush]
type = PlayerPush
trigger1 = 1
value = 0

[State 1193, End]
type = SelfState
trigger1 = vel y > 0 && pos y >= 0
value = 5100
Last Edit: July 05, 2020, 11:04:51 pm by Mark85
Re: Wall bounce not working
#2  July 05, 2020, 11:21:33 pm
  • ****
  • Pixels are atom's of resolution,Low-res or Hi-res
    • Turkey
    • metekervan26@gmail.com
Nevermind solved