forward dash with backward dash code

Started by jimboshorimbo, April 30, 2023, 09:30:16 PM

Previous topic - Next topic

jimboshorimbo

Hello everyone, I am having trouble trying to make a forward dash with a backward dash code, Here is the code ; RUN_BACK
[Statedef 105]
type    = A
physics = A
ctrl = 0
anim = 105
sprpriority = 1

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

[State 105, 2]
type = CtrlSet
trigger1 = Time = 2
value = 1

[State 105, 3]
type = ChangeState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 106

If anyone knows how to do this with this code, please reply to this message
don't have one

WastedCoder

If u want him to dash forward then in your velset controller use a positive number for x, like 5, 10 etc. and a negative number, like -3,-8 etc. for y to go up, if u need.

Or, if u have those numbers stored in your constant, then just change const(velocity.run.back.x) to const(velocity.run.fwd.x), same for Y value with const(velocity.run.fwd.y)

Odb718

Make sure your
run.back = -12,0
has a 2nd value. ^^^ is for my Ryu. If I add

[State 105, 1]
type = VelSet
trigger1 = Time = 0
x = const(velocity.run.back.x)
y = const(velocity.run.back.y)

to his state 200, he slides backwards. Which leads me to think your  CtrlSet might be messing things up too soon for you to notice.
Add a

[State 0, PosSet]
type = PosSet
trigger1 =  time = 0
y = -1
and a

[State 66687, 1] ;Gravity
type = VelAdd
Trigger1 = time > 30 ;change this
y = .4

and see if that changes things. I have a feeling your ChangeState is instantly switching you out of that state. I'd add
Trigger1 = time > 30 ;change this
to the changestate as a test also.
vVv Gouken718 vVv SabreTooth718 vVv