YesNoOk
avatar

slight gravity/infinite (?) problem (Read 3797 times)

Started by #Shaun, November 26, 2007, 05:21:21 pm
Share this topic:
slight gravity/infinite (?) problem
#1  November 26, 2007, 05:21:21 pm
  • *****
  • corner push pusher
Over the thanksgiving weekend I finally got rid of the laziness flowin' in my veins and started to redo my Kung Fu guy (from the nes game Kung Fu) project. I managed to get a lot done in two days max.....but I'm having a slight problem with him doing two different strengths of a triple-punch atk.

CNS

;=======================================================================
; Specials (Triple Punch 1) ============================================
;=======================================================================
[Statedef 1100]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1100
sprpriority = -1

[State 250, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1



[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 5

[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 5

[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 5




[State 220, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
animtype  = hard
damage    = 16,10
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = hard
damage    = 16,10
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = hard
damage    = 16,10
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5,-4
air.velocity = -2.5,-4

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 895, 3

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


;=======================================================================
; Specials (Triple Punch 2) ============================================
;=======================================================================
[Statedef 1105]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim = 1105
sprpriority = -1

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 895, 4

[State 250, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 1

[State 6011, AI]
type = AfterImage
trigger1 = time = 0
time = 11
length = 9
palbright = 34,15,156
framegap = 2
trans = add

[State 220, 1]
type = PlaySnd
trigger1 = Time = 2
value = 0, 4

[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 1
x = 7

[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 2
x = 7

[State 230, Velocity]
type = VelSet
trigger1 = AnimElem = 3
x = 7




[State 220, 2]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
animtype  = hard
damage    = 26,20
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 2
attr = S, NA
animtype  = hard
damage    = 26,20
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 2]
type = HitDef
trigger1 = AnimElem = 3
attr = S, NA
animtype  = hard
damage    = 26,20
guardflag = MA
pausetime = 6,6
sparkno = 1
sparkxy = -10,-70
hitsound   = 5,2
guardsound = 6,0
envshake.time = 7
envshake.ampl = 2
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5,-4
air.velocity = -2.5,-4
fall = 1

[State 200, 1]
type = PlaySnd
trigger1 = Time = 1
value = 895, 3

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

CMD

;---------------------------------------------------------------------------
;Specials (Triple Punch 1)
[State -1, Specials (Triple Punch 1)]
type = ChangeState
value = 1100
Triggerall = command = "QCF_X"
Triggerall = Command != "holddown"
Trigger1 = StateType = S
trigger1 = ctrl
trigger2 = movecontact
;---------------------------------------------------------------------------
;Specials (Triple Punch 2)
[State -1, Specials (Triple Punch 2)]
type = ChangeState
value = 1105
Triggerall = command = "QCF_Y"
Triggerall = Command != "holddown"
Trigger1 = StateType = S
trigger1 = ctrl
trigger2 = movecontact

When I beta tested him he didn't get stuck in the air and start performing ground-based, but when the CPU got a chance it did, while at the same time doing it an infinite # of times. What the hell?

I should also point out that he's also cancelling out of his super atks (which I don't want him to do). I know I should've made another topic about thatbut....it'd be waste. If this code isn't enough help just download him - he's only 500KB.
Re: slight gravity/infinite (?) problem
#2  November 26, 2007, 08:00:11 pm
  • avatar
  • ******
Quote
Triggerall = command = "QCF_X"
Triggerall = Command != "holddown"
Trigger1 = StateType = S
trigger1 = ctrl
trigger2 = movecontact
This means

Either
command = "QCF_X" && Command != "holddown" && StateType = S && ctrl

or
command = "QCF_X" && Command != "holddown" && movecontact

Notice anything wrong ?
Yeah, the second block says he can perform the move as long as the current move hits (and you perform the command).
As long as the current move hits... What current move ? Any. As soon as a super attack hits, as soon as an aerial basic attack hits, any attack, you do the command, you can do the move.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.
Re: slight gravity/infinite (?) problem
#3  November 28, 2007, 04:29:25 pm
  • *****
  • corner push pusher
I found and fixed the problem last night. Thanks for the feedback tho.