rolling
Page 1 of 1
rolling
-Note-
This code is not by me btw, its open source and decided to add it to my code archive.
This is KOF's evade system, where your character roll/slides forward, dodging most attacks. You can also use this ability to go behind your opponent if he/she is close enough to you.
The speed and duration of this move varies from character, so it's recommended that you adjust those 2 attributes.
This is a generic evade state for moving forward, but you can also create another state for moving back if you want.
Code:
[Statedef ****]
type = S
movetype = I
physics = N
anim = ****
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 0
facep2 = 0
hitdefpersist = 0
movehitpersist = 0
hitcountpersist = 0
sprpriority = 0
If you want the character to go behind the opponent as he/she moves passes it, add in this piece.
Code:
[State ****: SprPriority]
type = SprPriority
trigger1 = (Vel X != 0)
value = -2
This is used for the temporary invulnerability during this move. The character can only be hit by throws. This invulnerability varies from character to character.
Code:
[State ****: NotHitBy]
type = NotHitBy
trigger1 = (Time < 20)
value = , NA, SA, HA, NP, SP, HP
This moves the character forward.
I use the trigger "Time = 5", to give a slight delay before the character actually moves. The speed is however you see fit.
Code:
[State ****: VelSet]
type = VelSet
trigger1 = (Time = 5)
x = *
You'll want something to stop your character's movement after a while.
Code:
[State ****: VelSet]
type = VelSet
trigger1 = (Time = 30)
x = 0
You'll need this piece to be able to move pass the opponent, if you're close.
Code:
[State ****: PlayerPush]
type = PlayerPush
trigger1 = (Vel X != 0)
value = 0
If you want, you can add in some AfterImages. This is optional though, but recommended. ^^ Adjust AfterImage values to your preferences.
Code:
[State ****: AfterImage]
type = AfterImage
trigger1 = (Vel X != 0)
time = 25
timegap = 2
framegap = 4
length = 15
paladd = 0, 0, 0
palmul = .50, .50, .50
palcontrast = 100,100,100
trans = add
persistent = 0
These next pieces are also optional; It's the ability to dodge while guarding in KOF. These are used for the flashy effects in the move, as well as using 1 level of power.
Code:
[State ****: SuperPause]
type = SuperPause
triggerall = (!Time)
trigger1 = (PrevStateNo = 150) || (PrevStateNo = 152)
time = 10
anim = ****
pos = *,*
movetime = 0
darken = 1
poweradd = -1000
unhittable = 1
[State ****: EnvColor]
type = EnvColor
triggerall = (!Time)
trigger1 = (PrevStateNo = 150) || (PrevStateNo = 152)
value = 255,255,255
time = 2
under = 1
Be sure to make the appropriate changes to the CMD file too, if you decide to add the previous codes mentioned:
Code:
[State -1]
type = ChangeState
value = ****
triggerall = (Command = "evade")
trigger1 = (StateType = S) && (Ctrl)
trigger2 = ((StateNo = 150) || (StateNo = 152)) && (Power >= 1000) ;Add this new trigger!
And in the CNS file... the move has ended.
Code:
[State ****: ChangeState]
type = ChangeState
trigger1 = (AnimTime = 0)
value = 0
ctrl = 1
This code is not by me btw, its open source and decided to add it to my code archive.
This is KOF's evade system, where your character roll/slides forward, dodging most attacks. You can also use this ability to go behind your opponent if he/she is close enough to you.
The speed and duration of this move varies from character, so it's recommended that you adjust those 2 attributes.
This is a generic evade state for moving forward, but you can also create another state for moving back if you want.
Code:
[Statedef ****]
type = S
movetype = I
physics = N
anim = ****
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 0
facep2 = 0
hitdefpersist = 0
movehitpersist = 0
hitcountpersist = 0
sprpriority = 0
If you want the character to go behind the opponent as he/she moves passes it, add in this piece.
Code:
[State ****: SprPriority]
type = SprPriority
trigger1 = (Vel X != 0)
value = -2
This is used for the temporary invulnerability during this move. The character can only be hit by throws. This invulnerability varies from character to character.
Code:
[State ****: NotHitBy]
type = NotHitBy
trigger1 = (Time < 20)
value = , NA, SA, HA, NP, SP, HP
This moves the character forward.
I use the trigger "Time = 5", to give a slight delay before the character actually moves. The speed is however you see fit.
Code:
[State ****: VelSet]
type = VelSet
trigger1 = (Time = 5)
x = *
You'll want something to stop your character's movement after a while.
Code:
[State ****: VelSet]
type = VelSet
trigger1 = (Time = 30)
x = 0
You'll need this piece to be able to move pass the opponent, if you're close.
Code:
[State ****: PlayerPush]
type = PlayerPush
trigger1 = (Vel X != 0)
value = 0
If you want, you can add in some AfterImages. This is optional though, but recommended. ^^ Adjust AfterImage values to your preferences.
Code:
[State ****: AfterImage]
type = AfterImage
trigger1 = (Vel X != 0)
time = 25
timegap = 2
framegap = 4
length = 15
paladd = 0, 0, 0
palmul = .50, .50, .50
palcontrast = 100,100,100
trans = add
persistent = 0
These next pieces are also optional; It's the ability to dodge while guarding in KOF. These are used for the flashy effects in the move, as well as using 1 level of power.
Code:
[State ****: SuperPause]
type = SuperPause
triggerall = (!Time)
trigger1 = (PrevStateNo = 150) || (PrevStateNo = 152)
time = 10
anim = ****
pos = *,*
movetime = 0
darken = 1
poweradd = -1000
unhittable = 1
[State ****: EnvColor]
type = EnvColor
triggerall = (!Time)
trigger1 = (PrevStateNo = 150) || (PrevStateNo = 152)
value = 255,255,255
time = 2
under = 1
Be sure to make the appropriate changes to the CMD file too, if you decide to add the previous codes mentioned:
Code:
[State -1]
type = ChangeState
value = ****
triggerall = (Command = "evade")
trigger1 = (StateType = S) && (Ctrl)
trigger2 = ((StateNo = 150) || (StateNo = 152)) && (Power >= 1000) ;Add this new trigger!
And in the CNS file... the move has ended.
Code:
[State ****: ChangeState]
type = ChangeState
trigger1 = (AnimTime = 0)
value = 0
ctrl = 1
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|