YesNoOk
avatar

forward dash with backward dash code (Read 2740 times)

Started by jimboshorimbo, April 30, 2023, 09:30:16 pm
Share this topic:
forward dash with backward dash code
#1  April 30, 2023, 09:30:16 pm
  • idk lol
  • I'm a bruce lee fan and I like chuchoryu's work
    • USA
Hello everyone, I am having trouble trying to make a forward dash with a backward dash code, Here is the code
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
Re: forward dash with backward dash code
#2  May 01, 2023, 03:17:48 pm
  • **
    • Ukraine
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)
Re: forward dash with backward dash code
#3  May 02, 2023, 02:57:32 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv