YesNoOk
avatar

Any reason a character won't dash? (Read 739 times)

Started by Plum, September 27, 2018, 02:57:06 am
Share this topic:
Any reason a character won't dash?
#1  September 27, 2018, 02:57:06 am
  • **
  • Variables > Boyfriends
I've been trying for hours to figure out why this character won't dash or rather run forward, I've checked commands and statedef  alike and I can't see why I can't get the running command to work at all. I even tried copying run and dash code from other characters and still nothing. I'm a little annoyed something so basic is stopping me at the moment, does anyone know what might be making my character unable to run when animations and all are present?
Last Edit: September 27, 2018, 05:23:23 am by Chartreuse
Re: Any reason a character won't dash?
#2  September 27, 2018, 03:27:21 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Does the char have the anim? Is the correct anim number
refrenced In the states?
Re: Any reason a character won't dash?
#3  September 27, 2018, 04:20:14 am
  • **
  • Variables > Boyfriends
Yeah, so far.

This is the whole code.

;---------------------------------------------------------------------------
; RUN_FWD
[Statedef 100]
type    = S
physics = S
anim = 100
sprpriority = 1

[State 100, 1]
type = VelSet
trigger1 = 1
x = const(velocity.run.fwd.x)

[State 100, 2] ;Prevent run from canceling into walk
type = AssertSpecial
trigger1 = 1
flag = NoWalk

[State 100, 3] ;Prevent from turning
type = AssertSpecial
trigger1 = 1
flag = NoAutoTurn

[State 100, 4]
type = ChangeState
trigger1 = command != "holdfwd"
trigger1 = var(51) = 0
value = 0

[State 100, 4]
type = ChangeState
triggerall = var(51)<=0
trigger1 = time >= 10
trigger1 = command != "holdfwd"
value = 0

[State 100,Dash];ƒ_ƒbƒVƒ…ƒXƒgƒbƒv
Type = ChangeState
TriggerAll=Time > 9
TriggerAll=var(51) > 0
Trigger1 = P2BodyDist X < 20
Trigger2 = P2MoveType!=H||P2StateType=L
Trigger2 = command!="holdfwd"
Trigger3 = inguarddist
trigger4 = EnemyNear,life <= 0
value = 0
Re: Any reason a character won't dash?
#4  September 27, 2018, 05:07:31 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
You might have to change the order of the commands,
put the dash cmd above the basic hits in the cmd file if
Its not already
Re: Any reason a character won't dash?
#5  September 27, 2018, 05:22:58 am
  • **
  • Variables > Boyfriends
I was about to say I tested the commands to see if that was the issue, I basically just copied the entire command from another character and it worked, though I couldn't figure out what was missing exactly, until you suggested putting the cmd itself above the basics!

I'm really grateful, thanks. I'm glad this was solved so quickly.
Re: Any reason a character won't dash?
#6  September 27, 2018, 05:42:53 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Damn that's 2 help topics sloved in a row for me today.
No problem dude.