I'm trying to update and custom on some characters (exemple with DW's Mai)
I try to give her a dash forward. (DW only gave her a run in his version)
I used DW code as a base.
I added the Dash code and transition from dash to run from JMorphman's Benimaru.
Then adding some AI stuffs from POTS Geese
Run works perfectly. (I think)
The only problem right now is the command input for cancelling into dash (= release FWD) is really picky.
To do a dash you have to do the FWD FWD input really fast, (hop bak is perfect, Benimaru hop forward and run is perfect as well)
I don't know what is wrong in my version.
Any help is welcome.
CMD used for the code
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1
[Command]
name = "holdupfwd"
command = /$UF
time = 1
[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1
[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1
AIR used for run and dash (I precised when character actually dash (leave the ground)
; Run forwards
[Begin Action 100]
Clsn2: 2
Clsn2[0] = -6, -90, 15, -65
Clsn2[1] = -20, -71, 20, 0
100,0, 0,0, 3;<---------------------ready pose
Clsn2Default: 2
Clsn2[0] = -25, -50, 24, 0
Clsn2[1] = -2, -72, 52, -31
Loopstart;<-----------------------------------the actual run
100,1, 0,0, 4,
100,2, 0,0, 4,
100,3, 0,0, 4,
100,4, 0,0, 4,
100,5, 0,0, 4,
100,6, 0,0, 4,
; Run Stop
[Begin Action 101]
Clsn2Default: 2
Clsn2[0] = -6, -90, 15, -65
Clsn2[1] = -20, -71, 20, 0
100,7, 0,0, 3
100,8, 0,0, 3
;Dash Forward
[Begin Action 110]
Clsn2: 2
Clsn2[0] = -18,-74, 21, 0
Clsn2[1] = -4,-84, 17,-64
10,0,0,0,1;<---------------------ready pose
Clsn2Default: 2
Clsn2[0] = -14,-83, 21,-30
Clsn2[1] = 0,-95, 21,-75
100,0,0,0,2;<---------------------ready pose
110,0,0,0,9;<-----------------------------------start to Dash(jump) forward
110,1,0,0,-1
;Dash Forward (Stopping)
[Begin Action 111]
Clsn2Default: 2
Clsn2[0] = -18,-74, 21, 0
Clsn2[1] = -4,-84, 17,-64
100,7, 0,0, 4
110,2, 0,0, 3
100,8, 0,0, 3
0,15, 0,0, 3
CNS Run and Dash/hop forward states
;------------------------------------
;Running
[Statedef 100]
type = S
movetype = I
physics = S
ctrl = 0
VelSet = 0,0
[State 100, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 100
[State 100, Velocity]
type = VelSet
trigger1 = AnimElem = 2 >= 0
x = Const(velocity.run.fwd.x)
[State 100, Change to Run Stop]
type = ChangeState
triggerall = Time >= 10
;;;;trigger1 = Command != "holdfwd" && Time >= 10
trigger1 = !AIlevel && command != "holdfwd";De POTS Geese
trigger2 = AIlevel && p2bodydist x <= 90;De POTS Geese
value = 101
ctrl = 1
[State 100, Change to Jump]
type = ChangeState
trigger1 = Command = "holdupfwd"
value = 40
;
[State 100, jump];De POTS Geese
type = changestate
trigger1 = AIlevel && random < 25
value = 40
[State 110, Dust Helper]
type = Helper
trigger1 = AnimElem = 2
helperType = Normal
stateNo = 8103
ID = 8100
name = "Dash Dust"
posType = P1
pauseMoveTime = 255
superMoveTime = 255
ownPal = 1
[State 105, Starting Step Snd]
type = PlaySnd
trigger1 = !Time
value = 102, 0
channel = 5
[State 105, Step1 Snd]
type = PlaySnd
trigger1 = AnimElem = 4
value = 100, 0
channel = 5
[State 105, Step2 Snd]
type = PlaySnd
trigger1 = AnimElem = 7
value = 100, 1
channel = 5
[State 100, No Walk During Run]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
;------------------------
;Run Stop
[Statedef 101]
type = S
movetype = I
physics = S
[State 101, Skid Snd]
type = PlaySnd
trigger1 = !Time
value = 101,0
[State 101, Skid Dust]
type = Explod
trigger1 = !Time
anim = 8104
sprPriority=3
posType = P1
pos = -15,0
vel = 0,0
scale = 0.5,0.5
pauseMovetime = -1
superMoveTime = -1
ownpal = 1
[State 101, ChangeAnim]
type = ChangeAnim
trigger1 = !Time
value = 101
[State 101, jump];Ajout de POTS Geese
type = changestate
trigger1 = !AIlevel && command = "holdup"
value = 40
[State 101, End]
type = ChangeState
trigger1 = !AnimTime
;value = 0
value = ifelse(command = "holddown", 10, 0);;;;;Ajout de POTS Geese(aller vers crouch ou stand)
ctrl = 1