YesNoOk
avatar

trying to code a hurricane kick (Read 745 times)

Started by BC, April 20, 2008, 04:14:31 pm
Share this topic:

BC

trying to code a hurricane kick
#1  April 20, 2008, 04:14:31 pm
  • avatar
  • ****
    • UK
im using a SVC version ok gouki and i want to code a tatsumaki (hurricane kick) the animations are 1200 the start and hit part of it.....1201 the finishing part and 1202 the land part... i have absolutely no idea how to code one, my attempts ended up landing in mid air and the velcoities were all wrong.

seeing as ive given the animations can someone please help. dont worry about the hitdef i can do that, and any changestate im ok with that but not sure on the triggers like Y vel = 0 or something. can some one give me a basic  template please.
Accepting commissions
Last Edit: April 20, 2008, 08:37:15 pm by blackchaos07
Re: im sure someone on here can help after 10 views!
#2  April 20, 2008, 08:48:18 pm
  • ******
    • Germany
need three states:
- startup
- kicks during the move
- end

short whip-up:

[Statedef x]
type = A ; aerial state
movetype = A ; attacking state
physics = N ; no physics!
ctrl = 0 ; no ctrl!
anim = 1200

; up-forward-movement
[State X, set initial velocity]
type = VelSet
trigger1 = !time
x = 4 ; adjust
y = -5 ; adjust

[State X, go on]
type = ChangeState
trigger1 = animelem = Y; the element in your animation that ends the "startup"
value = X+1

[Statedef X+1]
type = A
movetype = A
physics = N ; still, this move defies all physics

; no change of animation here, the one from the initializing state continues!

; only forward movement!
[State X+1, set new velocity]
type = VelSet
trigger1 = !time
x = 4 ; adjust
y = 0 ; adjust

; hit front
[State X+1, hit]
type = HitDef
trigger1 = animelem = 7 ; first kick, front
trigger1 = animelem = 11 ; second kick, front
; ...any other kicks
; whatever

; hit back
[State X+1, hit]
type = HitDef
trigger1 = animelem = 9 ; first kick, back
trigger1 = animelem = 13 ; second kick, back
; ...any other kicks
; whatever

[State X+1, end]
type = ChangeState
trigger1 = time = 180 ; usually varies with short / strong / roundhouse
value = X+2

[Statedef X+2, end]
type = A
movetype = I
physics = N ; applying aerial physics
anim = 1201

; apply gravity -> fall down to earth
[State X+2, end]
type = Gravity
trigger1 = 1 ; do this continuously
value = X+2

[State X+2, end]
type = ChangeState
trigger1 = Pos Y >=0 ; on ground level or lower
value = X+3

[Statedef X+3, landed]
type = S
movetype = I
physics = S
anim = 1202

[State X+3, back to normal]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


...untested.
Last Edit: April 20, 2008, 09:02:41 pm by Valodim

BC

Re: trying to code a hurricane kick
#3  April 20, 2008, 09:07:07 pm
  • avatar
  • ****
    • UK
ok i have a problem he doesnt land on mugen floor he lands alot lower?
Accepting commissions

BC

Re: trying to code a hurricane kick
New #4  April 20, 2008, 09:15:18 pm
  • avatar
  • ****
    • UK
[Statedef 1200]
Type = A
MoveType = A
Physics = N
Anim = 1200
VelSet = 0
Ctrl = 0
PowerAdd = 50
Juggle = 8

[State 1200, Speed]
Type = VelSet
Trigger1 = AnimElem = 2
x = 4
y = -4.5

[State 1200, Stop vel y]
Type = VelSet
Trigger1 = AnimElem = 6, = -1
y = 0

[State 1200, FX Snd]
Type = PlaySnd
Trigger1 = AnimElem = 6
Trigger2 = AnimElem = 10
Value = 1, 2
Channel = 3

[State 1200, 1]
type = HitDef
trigger1 = AnimElem = 2
trigger2 = animelem  = 7
trigger3 = animelem = 15
attr = S, NA
damage = 60
animtype = hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 10, 10
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12


[State 1200, End]
type = ChangeState
Trigger1 = Time = 33
value = 1201

;- Tatsumaki Zankuukyaku - Part 2 --
[Statedef 1201]
Type = A
MoveType = I
Physics = N
Anim = 1201
Ctrl = 0
PowerAdd = 0

[State 1201, Veladd]
type = Gravity
trigger1 = 1

[State 1201, End]
type = ChangeState
Trigger1 = Pos y >= 0
value = 1202

;-------- Landing -------
[Statedef 1202]
Type = S
MoveType = I
Physics = N
Anim = 1202
Ctrl = 0
PowerAdd = 0
VelSet = 0,0


[State 1202, 9]
type = ChangeState
Trigger1 = !AnimTime
value = 0
Ctrl = 1

this works great, the state no's have been changed to match the animations.
Accepting commissions
Last Edit: April 20, 2008, 11:43:22 pm by blackchaos07
Re: trying to code a hurricane kick
#5  April 20, 2008, 09:17:51 pm
  • ****
  • Humanity can be so much more
    • Jamaica
    • https://network.mugenguild.com/makkah/
If he lands lower than he should put this in the land state:

[State ####, set]
type = posset
trigger1 = time = 0
y = 0
Re: trying to code a hurricane kick
#6  April 20, 2008, 09:18:21 pm
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
You don't need to put a value on Gravity. :P




Also this is what I'd use to land instead. First, make a custom land state, such as 1235. Make sure that in that state you set ctrl = 0 and have a ChangeState that changes to state 0 as soon as animtime = 0. Also make that state the landing animation. Remove anything regarding the landing part in State 1234, and just put this there:
[State 1234, ChangeState]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1235
Re: trying to code a hurricane kick
#7  April 20, 2008, 09:30:06 pm
  • ******
    • Germany

[State 12345, set initial velocity]
type = VelSet
trigger1 = !time
x = 4 ; adjusty = 0 ; adjust


you removed a linebreak there, so the y velocity doesn't get reset...

BC

Re: trying to code a hurricane kick
#8  April 20, 2008, 09:50:07 pm
  • avatar
  • ****
    • UK
ok still getting the problem with the landing, he is landing lower than he should, ive edited the previous code i posted
Accepting commissions
Re: trying to code a hurricane kick
#9  April 20, 2008, 09:52:10 pm
  • ******
    • Germany
add a velset for y=0 to the landing state. the position is set to y=0 at the beginning, but until it ends the positive y velocity from the gravity applied earlier is still there.

BC

Re: trying to code a hurricane kick
New #10  April 20, 2008, 09:59:31 pm
  • avatar
  • ****
    • UK
thanks for all your help guys it works now

for anyone else wanting to code the move, ive posted the working code above :sugoi:
Accepting commissions
Last Edit: April 20, 2008, 10:02:54 pm by blackchaos07