Can anyone tell my what is wrong wit this code?In CNS;Call the helper[StateDef 10000]type = Smovetype= Iphysics = Sjuggle = 1velset = 0,0ctrl = 1[State 10000, 1]type = Helpertrigger1 = 1trigger1 = NumHelper(9010) = 0ID = 9010stateno = 9010pos = 160, -140postype = lefthelpertype = normalname = "FINISH HIM!"keyctrl = 0ownpal = 1[State 10000, 2]type = ChangeStatetrigger1 = AnimTime = 0value = 0ctrl = 1;--------------------------------------------------------------------------;Helper state[StateDef 9010]type = Smovetype = Aphysics = Sanim = 9010velset = 0,0ctrl = 1[State 9010, 1]type = HitDeftrigger1 = animelem = 1trigger1 = P2StateType != Aattr = S, SAdamage = 0,0animtype = Heavyhitflag = MFguardflag = Apriority = 7pausetime = 0,3sparkxy = 0,0sparkno = -1gurad.sparkno = -1hitsound = -1guardsound = -1ground.type = Highground.slidetime = 0ground.hittime = 0ground.velocity = 0air.velocity = 0air.fall = 1fall = 0numhits = 0p2stateno = 49999;--------------------------------------------------------------------------;"FINISH HIM!" - MSG[Statedef 9011]type = Smovetype= Iphysics = Sjuggle = 1velset = 0,0anim = 9011ctrl = 0[State 9011,]type = PlaySndtrigger1 = Time = 1value = 3,0[State 9011, 3]type = SprPrioritytrigger1 = 1value = 5[state 9011, 4]type = Helpertrigger1 = NumHelper(9010) = 1trigger1 = NumHelper(9011) = 0trigger1 = P2StateNo = 49999id = 9011stateno = 9011pos = 160, -140postype = lefthelpertype = normalname = "FINISH HIM! - MSG"keyctrl = 0;--------------------------------------------------------------------------;Dizzy[Statedef 49999]type = Smovetype= Hphysics = Sjuggle = 1ctrl = 0velset = 0,0[State 49999, 1]type = LifeSettrigger1 = 1value = 1[State 49999, 2]type = TargetLifeAddtrigger1 = P2life <= 1value = 1[State 49999, 3]type = SelfStatetrigger1 = Time = 48trigger1 = P2StateNo != [3000,3200]value = 5301ctrl = 0[State 49999, 4]type = LifeSettrigger1 = P2StateNo = 5300trigger1 = Time = 48trigger1 = P2StateNo != [3000,3200]value = 0;Enemy is dizzy.[State 49999, 5]type = ChangeAnimtrigger1 = AnimExist(5300)trigger1 = Anim != 5300value = 5300;-------------------------------------------------------------------------[Statedef -2][State -2, 1]type = varsettrigger1 = Win = 1trigger1 = NumHelper(9010) = 0v = 58value = 1[State -2, 2]type = varsettrigger1 = Win = 1trigger1 = NumHelper(9010) = 1trigger1 = p2life != 0v = 58value = 0[State -2, 3]type = AttackMulSettriggerall = !Var(58)triggerall = p2Life <= 1trigger1 = Win = 0trigger1 = RoundNo != 1trigger1 = P2StateNo = 49999value = 9999;-------------------------------------------------------------------------- In CMD[State -1]type = Changestatetrigger1 = Ctrl ;It must have the control.trigger1 = P2Life <= 1 ;Life of P2 must be equal the 1.trigger1 = NumHelper(9010) = 0 ;It cannot have another Helper as this in the screen.trigger1 = P2StateNo != 49999 ;Opponent cannot be in Custom State.trigger1 = RoundNo != 1 ;Round cannot be the first one.trigger1 = var(58) >= 1 ;You must be to win one round before.trigger1 = statetype != A ;P1 cannot be in air.trigger1 = p2statetype != A ;P2 also not.value = 10000;--------------------------------------------------------------------------The Finish Him massage wont appear on the screen, as well as sound, but P2 seems to be send to a custom state. After hit he is in "dizzy" state, but after 48 ticks he wont die! And I can't move! What is wrong here?
Ok, well I see a couple of things wrong with your code. Most importantly though, I don't see any way of your message helper ever getting to state 9011. My guess is that you wanted the "FINISH HIM!" helper to go to the message state when hit. That can't happen with this code. You need either a ChangeState or p1stateno=9011 on the HitDef of your helper.
and why [State 49999, 3]type = SelfStatetrigger1 = Time = 48trigger1 = P2StateNo != [3000,3200]value = 5301 <<<<<<<<<<HERE any other animation won't work? should be 5050ctrl = 0
I'm not sure why you would use P2Stateno in a custom state. I actively avoid P2StateNo because its unreliable, so I don't really know what it would be checking. If you're sending P2 to your state, then P2StateNo would return ... their own stateno or essentially P1's? I'm not sure about that. Try removing that trigger with P2Stateno in it all together, or comment it out. Does it work then? Trial and Error is the key to success
How is p2stateno unreliable? P2stateno returns the nearest alive opponent's state number. There's nothing unreliable about it. But I would avoid it in that situation, definitely.
Rajaa, what I mean is that it's not reliable in all situations. Once taken into Simultaneous Mode, P2 is only P2, not just your opponent. One would think that, given the description in the docs, it would fail miserably in that situation. I personally avoid it, because I want something that works anywhere I take it.You'd think they'd call it something more self-explanatory like "EnemyNearStateNo" (enemynear(0),stateno ) if it was going to do return the state number of the nearest alive opponent. I don't know honestly. I've been avoiding it, since I read the description for the reasons stated above.
You talk about this >trigger1 = P2StateNo != [3000,3200]? state 3000 to 3200 is a fatality state, so P2 should die if I don't perform fatality in 48 ticks. I removed them and P2 still won't die! And I don't know why, there is a LifeSet to 0 ,after 48 ticks in state 5300 (dizzy state) I checked other CNS, and all of them has the same structure... Posted: March 28, 2013, 06:09:19 pmNow its working! LifeSet should be BEFORE selfstate... I make simple mistakes....;p