Jump to content
  • 0

Juggle Problem


David Rattlz

Question

Ok so I coded a special attack that hits the oppenent to the ground and then makes the oppenent bounce up just enough so that I can chain it with other attacks. but as soon as the opponent bounces back I try to hit him but i can´t, I've already checked if it was a collision box problem on p2's end but no the collision boxes are there, I even set the move to take no juggle point but still no luck, can anyone help ?

Here's a video showing the problem:

https://www.youtube.com/watch?v=k_HH7Zq8Pxg

 

Here's the code:

 

; Shatter Spirit

[Statedef 9001]

type = S

movetype= A 

physics = S 

juggle = 0 

velset = 2,0 

ctrl = 0

anim = 9001 

poweradd = 20 

sprpriority = 2 

 

[State 9001, PlaySnd]

type = PlaySnd

trigger1 = animelem = 2

value = S0,0

channel = -1

 

[State 9001, 1.1]

type = Explod

trigger1 = animelem = 1

trigger1 = numexplod(7000) = 0

ID = 7090

sprpriority = 4

persistent =1

postype = p1

pos = -64,-38

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7000

ownpal = 1

removeongethit = 1

 

[State 9001, 1.2]

type = Explod

trigger1 = animelem = 2

trigger1 = numexplod(7010) = 0

ID = 7091

sprpriority = 4

persistent =1

postype = p1

facing = -1

pos = -37,-138

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7010

ownpal = 1

removeongethit = 1

 

[State 9001, 1.3]

type = Explod

trigger1 = animelem = 3

trigger1 = numexplod(7010) = 0

ID = 7092

sprpriority = 4

postype = p1

pos = 63,-55

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7010

ownpal = 1

removeongethit = 1

 

[State 9001, 1.4]

type = Explod

trigger1 = animelem = 4

trigger1 = numexplod(7010) = 0

ID = 7093

sprpriority = 4

persistent =1

postype = p1

facing = -1

pos = -37,-138

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7010

ownpal = 1

removeongethit = 1

 

[State 9001, 1.5]

type = Explod

trigger1 = animelem = 5

trigger1 = numexplod(7000) = 0

ID = 7094

sprpriority = 4

persistent =1

postype = p1

pos = -64,-38

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7000

ownpal = 1

removeongethit = 1

 

[State 9001, 1.6]

type = Explod

trigger1 = animelem = 6

trigger1 = numexplod(7000) = 0

ID = 7095

sprpriority = 4

persistent =1

postype = p1

facing = -1

pos = 15,-41

scale = 0.23, 0.23

bindtime = -1

removetime = -1

anim = 7000

ownpal = 1

removeongethit = 1

 

[State 9001, 1]

type = HitDef

trigger1 = animelem = 3

attr = S, NA

damage = 23, 0 

animtype = Light 

guardflag = MA 

hitflag = MAF 

priority = 3, Hit 

pausetime = 2, 8 

sparkno = S6250

guard.sparkno = S6301 

sparkxy = -10, -76 

hitsound = S3, 2 

guardsound = 6, 0

ground.type = High

ground.slidetime = 5 

ground.hittime = 12 

ground.velocity = 0, 8

airguard.velocity = -1.9,-.8

air.type = High

air.velocity = 0,8 

air.hittime = 0 

fall = 1

fall.recover = 1

fall.damage = 20

envshake.time = 50

envshake.freq = 100

envshake.ampl = 4

fall.envshake.time = 40

fall.envshake.freq = 60

fall.envshake.ampl = 4

 

[State 9001, TargetVelAdd]

type = TargetVelAdd

trigger1 = movehit && animtime = 0

x = 0

y = -6.5

 

[State 9001, 5]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

For setting bounce speed, you can always try fall.xvelocity and fall.yvelocity

Usually I do a copypaste of this state:

;Ground Bounce basic:

[Statedef 660]

type = A

movetype= H

physics = N

velset = 0,0

 

[State 1025, Anim] ;Freeze

type = ChangeAnim

trigger1 = 1

value = 5160

 

[State 1025, State]

type = ChangeState

trigger1 = HitShakeOver = 1

value = 661

 

;Le ebin groundbounce

[Statedef 661]

type = A

movetype= H

physics = N

velset = 0,0

 

[State freezeanim]

type = ChangeAnim

trigger1 = Time = 0

value = 5160

[State Get my Hit X and Y vels]

type = HitVelSet

trigger1 = Time = 0

x = 1

y = 1

[State Ensure my speed]

type = VelAdd

trigger1 = Time

y = gethitvar(yaccel)

 

[State truck]

type = ChangeState

trigger1 = vel y > 0

trigger1 = vel y + pos y >= Const(movement.down.bounce.offset.y)

value = 662

ctrl = 0

 

;Le ebin groundbounce

[Statedef 662]

type = A

movetype= H

physics = N

velset = 0,0

 

[State 821, 2] ; Recover near ground (use ChangeState)

type = ChangeState

triggerall = Vel Y > 0

triggerall = Pos Y >= -20

triggerall = alive

triggerall = CanRecover

trigger1 = Command = "recovery"||name="Training"

value = 5200 ;HITFALL_RECOVER

 

[State 821, 3] ; Recover in mid air (use SelfState)

type = SelfState

triggerall = Vel Y > 0

triggerall = alive

triggerall = CanRecover

trigger1 = Command = "recovery"||name="Training"

value = 5210 ;HITFALL_AIRRECOVER

 

[State Forced into ground]

type = PosSet

trigger1 = Time = 0

y = 0

[State 0, Offset]

type = Offset

trigger1 = Time < 8

x = 3*ceil(Cos(2*pi*time/4.0))

y = 3*ceil(Sin(2*pi*time/4.0))

[State get sound]

type = PlaySnd

trigger1 = Time = 0

value = F7,2

[State AAAAAAAAA]

type = Explod

trigger1 = Time = 0

anim = F62

pos = 0,0

postype = p1

facing = 1

bindtime = 1

removetime = -2

scale = 2,2.5

ontop = 1

ownpal = 1

removeongethit = 0

[State freezeanim]

type = ChangeAnim

trigger1 = time<=7

value = 5100

[State anim]

type = ChangeAnim

trigger1 = time=8

value = 5160

[State Get Hurt]

type = HitFallDamage

trigger1 = Time = 0

[State 0, HitFallVel]

type = HitFallVel

trigger1 = Time = 8

 

[State special gravity]

type = VelAdd

trigger1 = Time>8

y = gethitvar(yaccel)

 

[State Truck]

type = SelfState

trigger1 = vel y > 0

trigger1 = vel y + pos y >= Const(movement.down.bounce.offset.y)

value = 5110

ctrl = 0

Link to comment
Share on other sites

  • 0

target veladd will not work because you do not have a target (as in no one in a custom state)

there IS a way to make them bounce using the regular hitdef, I unfortunately do not remember the method. (Check your sctrls, and look for down.bounce in your hitdef)

other than that you need a customstate to guarentee you a proper bounce to your liking.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...