YesNoOk
avatar

Regeneration of life that spends power. (Read 7060 times)

Started by IkuTronHD, January 20, 2017, 03:31:51 pm
Share this topic:
Regeneration of life that spends power.
#1  January 20, 2017, 03:31:51 pm
  • ***
    • Spain
    • https://ikutronhd.wixsite.com/ikutronsite/yo
First we will create three animations the first one when starting to load that if it carries the boxes of collisions:
Spoiler, click to toggle visibilty

The second must be a loop without using the Start loop in this frame:
Spoiler, click to toggle visibilty
And the last animation is when the life load ends:
Spoiler, click to toggle visibilty

You add this code in the cns of char:
Code:
;-------------------------------Life up (start)
;KOF Memorial Lifedd edit by IkuTronHD
[Statedef 920]
type = S
movetype = I
physics = S
anim = 910
velset = 0
ctrl = 0

[State 301, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = f100,101
channel = 11

[State 730, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 921

;-------------------------------Life up
; Life up
[Statedef 921]
type = S
movetype = I
physics = S
anim = 911

[State 705, 2]
type = Explod
triggerall = numexplod(921)= 0
trigger1 = time = 0
anim = f130
ID = 921
sprpriority = 3
postype = p1
pos = 0,0
bindtime = -1
removetime = -1
removeongethit = 1

[State 1900,5]
type = PalFX
trigger1=!(GameTime % 3)
time=1
time = 1
add = 0,100,0

[State 735, 1]
type = ChangeState
trigger1 = command != "holdc" ;<==You can change it for the command that you want
trigger3 = command != "holdz" ;<==You can change it for the command that you want
value = 922

[State 921, Recuperar]
type = LifeAdd
trigger1 = time >= 5
value = 1

[State 921, PowerDrain]
type = Poweradd
trigger1 = time >= 5
value = -15

[State 735, 2]
type = ChangeState
trigger1 = Life >= LifeMax
trigger2 = Power = 0
value = 323

[State 735, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 921

;-------------------------------Life up (end)
[Statedef 922]
type = S
movetype = I
physics = S
anim = 912

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 921

[State 740, 1]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-------------------------------Life up (maxed out)
[Statedef 323]
type = S
movetype = I
physics = S
anim = 912

[State 301, snd]
type = PlaySnd
trigger1 = AnimElem = 1
value = f101,0

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 921

[State 313, Explod]
type = Explod
trigger1 = time = 0
anim = f140
pos = 0,0
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1,1
sprpriority = 7

[State 1000, EnvShake]
type = EnvShake
trigger1 = AnimElem = 1
time = 15
freq = 90
ampl = -5
phase = 90

[State 1100, 1]
type = RemoveExplod
trigger1 = AnimElem = 1
ID = 920

[State 741, 2]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

And add the next code in state -2:
Code:
[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 910 && stateno != 911
channel = 10

[State -2, StopSnd]
type = StopSnd
trigger1 = stateno != 920 && stateno != 921
channel = 11

And add the next code in state -1:
Code:
;Life charge
[State -1]
type = ChangeState
value = 990
triggerall = statetype = S
triggerall = Life < LifeMax
triggerall = Power > 15
triggerall = ctrl = 1
trigger1 = command = "holdc" ;<==You can change it for the command that you want
trigger1 = command = "holdz" ;<==You can change it for the command that you want

PD:You notice that the load animations and sounds are inside these files: FightFX.sff, FightFX.air.Commond.snd. These files are in the data folder.

     Posted: January 20, 2017, 03:32:43 pm
I have a problem with this code and it is that they do not go with the characters of minoo does not subtract power or life and I do not know why. And the other characters I have in Winmugen do go.