YesNoOk
avatar

Character stuck in stand state during intro? (Read 271 times)

Started by Nny, May 26, 2014, 04:06:51 am
Share this topic:

Nny

Character stuck in stand state during intro?
#1  May 26, 2014, 04:06:51 am
  • **
  • Fail Hill Zone, Act 1
    • USA
    • virtualicon@hotmail.com
    • http://www.facebook.com/FantasyVault
I don't really know how or why this is happening. But for the intro he's in his stand state although in his states it's supposed to be going to anim = 191. I haven't messed with the intro coding at all so, what's the deeaaal. If it matters I do have a common1.cns in my character.

The intro:
Code:
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
[Statedef 191]
type = S
ctrl = 0
anim = 191
velset = 0,0

[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

; You can delete the following two controllers if you're building your own
; character using KFM. These are the wood pieces that KFM kicks.
[State 191, Wood 1]
type = Explod
trigger1 = RoundState != 0
persistent = 0
anim = 191
postype = p1
pos = 260, -90
velocity = -4.2, -7
accel = 0, .32
removetime = 48

[State 191, Wood 2]
type = Explod
trigger1 = AnimElemTime(7) = 1
anim = 192
postype = p1
pos = 60, -70
velocity = 2, -4
accel = 0, .32
removetime = 35

; You can delete the following two controllers if you're building your own
; character using KFM. These play back the sounds of the wood block being
; broken.
[State 191, Snd 1]
type = PlaySnd
trigger1 = AnimElem = 7
value = F5,2
volume = -40

[State 191, Snd 2]
type = PlaySnd
trigger1 = AnimElemTime(7) = 3
value = F5,3
volume = -80
Re: Character stuck in stand state during intro?
#2  May 26, 2014, 04:21:15 am
  • ***
    • USA
Your statedef 191 looks ok, but what does 190 look like?
           

Nny

Re: Character stuck in stand state during intro?
#3  May 26, 2014, 04:43:42 am
  • **
  • Fail Hill Zone, Act 1
    • USA
    • virtualicon@hotmail.com
    • http://www.facebook.com/FantasyVault
I don't have a state 190. I have an animation 190?
(edit) oh wait
Code:
;---------------------------------------------------------------------------
; Pre-intro
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(190)
value = 190

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191
Re: Character stuck in stand state during intro?
#4  May 26, 2014, 06:54:38 am
  • ***
    • USA
If you do or if you dont have an animation 190, you need to change it so statedef 190 changes to statedef 191. How ever you'd like to do it is up to you. Remember to use debug. (CTRL+D) In your case you cant hit ctrl+d because that would start the round. You can edit your mugen settings in the data folder to start with debug active.
           
Re: Character stuck in stand state during intro?
#5  May 26, 2014, 08:52:08 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
In statedef 191, you gave him a changeanim to anim 190. Remove it.

Nny

Re: Character stuck in stand state during intro?
#6  May 26, 2014, 09:17:39 am
  • **
  • Fail Hill Zone, Act 1
    • USA
    • virtualicon@hotmail.com
    • http://www.facebook.com/FantasyVault
Okay. That still didn't work, but here is the current state defs i have right now. Keep in mind that this is still not giving me my intro.

In my main.cns
Code:
;---------------------------------------------------------------------------
; Introduction
; CNS difficulty: basic
; CNS ƒŒƒxƒ‹: Šî–{
[Statedef 191]
type = S
ctrl = 0
anim = 190
velset = 0,0

(took this out before, still didnt work)
[State 191, 1] ;Freeze animation until PreIntro is over
type = ChangeAnim
trigger1 = RoundState = 0
value = 190

[State 191, 2] ;Assert this until you want "round 1, fight" to begin
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 3] ;Change to stand state when done
type = ChangeState
trigger1 = AnimTime = 0
value = 0

In my common1.cns (i have a dash code in my common state and it works just fine, so i dont know why this wont work.)
Code:
;---------------------------------------------------------------------------
; Pre-intro
[Statedef 190]
type = S
ctrl = 0
velset = 0,0

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191

;---------------------------------------------------------------------------
; Intro (override this state to give character an intro)
[Statedef 191]
type = S
ctrl = 0

[State 191, 1]
type = ChangeState
trigger1 = Time = 0
value = 0
Last Edit: May 26, 2014, 09:34:33 am by Nny
Re: Character stuck in stand state during intro?
#7  May 26, 2014, 10:31:42 am
  • ***
    • USA
get rid of the stuff in the common.cns

;---------------------------------------------------------------------------
[Statedef 190]
type = S
ctrl = 0
velset = 0,0
 
[State 190, 1]
type = ChangeAnim
trigger1 = SelfAnimExist(191)
value = 191

[State 190, 2] ;Go straight to intro.
type = ChangeState
trigger1 = Time = 0
value = 191
;---------------------------------------------------------------------------
[Statedef 191]
type = S
ctrl = 0
velset = 0,0

[State 191, 1]
type = AssertSpecial
trigger1 = 1
flag = Intro

[State 191, 2]
type = ChangeState
trigger1 = animtime = 0
value = 0
;-------------------------------------------

Use that. Make sure your animation doesnt end with a -1 as the last frame
           
Re: Character stuck in stand state during intro?
#8  May 26, 2014, 07:14:33 pm
  • *****
  • Video Game Veteran
    • USA
    • gcnmario.free.fr
Oh yeah. That's a good point there. :)

In your AIR file, If you have an animation which ends with frame time -1, then it will never stop playing if it reaches the end.

"You must defeat my flaming
dragon punch to stand a chance."

Nny

Re: Character stuck in stand state during intro?
#9  May 27, 2014, 01:11:17 am
  • **
  • Fail Hill Zone, Act 1
    • USA
    • virtualicon@hotmail.com
    • http://www.facebook.com/FantasyVault
I was told to get rid of the state 191 in the common file and it worked xD Thanks guys!