Yeah, I'm guetting used to this board .Anyways, I've made a special win when you win with a certain hyper. Everything's fine, except for one thing: my character changes states in the time I DON'T want it to. As it says in the code, I want this state (the winpose) to last more than 200 ticks, then changestate to 180, which returns him to the same state. Bleh, here's the code.[State 3301, ChangeState] ;This starts everything.type = ChangeStatetrigger1 = AnimElem = 47 && WinKOvalue = 185ctrl = 0;---------------------------------------------------------------------------;God End Win[Statedef 185]type = Sctrl = 1anim = 183velset = 0,0sprpriority = -4[State 185, PlayerPush]type = PlayerPushtrigger1 = 1value = 0[State 185, AssertSpecial]type = AssertSpecialtriggerall = PrevStateNo = 180trigger1 = Time = [0,250]flag = roundnotover[State 185, CtrlSet]type = CtrlSettrigger1 = PrevStateNo = 180value = 0[State 185, ChangeAnim]type = ChangeAnimtriggerall = PrevStateNo = 180trigger1 = Time = 0value = 183elem = 17[State 185, Win] ;THIS BITCH DOESN'T WORK PROPERLY .V.type = ChangeStatetriggerall = PrevStateNo=3301trigger1 = Time > 250value = 180ctrl = 0[State 180, ChangeState] ;win by God Endtype = ChangeStatetrigger1 = PrevStateNo = 185value = PrevStateNo
Uh... Can you display prevstateno in the debug and turn it on to keep track exactly tick by tick in which state you are and which is the prevstateno ?By it doesn't work, you mean it stays in state 185 ? Try to check the triggers by testing trigger1 = 1 instead of time > 250, things like that.
Try changing this:Code: [State 185, Win] ;THIS BITCH DOESN'T WORK PROPERLY .V.type = ChangeStatetriggerall = PrevStateNo=3301trigger1 = Time > 250value = 180ctrl = 0With this:Code: [State 185, Win]type = ChangeStatetriggerall = StateNo = 185 && animetime = (the no of the tick you want the change in)value = 180ctrl = 0
............. triggerall = StateNo = 185 <= absolutely useless && animetime = (the no of the tick you want the change in) <= missing the fact that he wants it to happen only if the previous state number is 3301, the changestate must not happen if it isn't.By the way, you probably got animetime wrong, animetime gives the time until the end of the animation, not the time passed since the beginning of the animation. It won't do anything relevant.
Byakko said, November 24, 2009, 06:25:33 pmUh... Can you display prevstateno in the debug and turn it on to keep track exactly tick by tick in which state you are and which is the prevstateno ?The prevstate no is state 3301, no debug flood, eerr...what else are you asking for? Byakko said, November 24, 2009, 06:25:33 pmBy it doesn't work, you mean it stays in state 185 ? Try to check the triggers by testing trigger1 = 1 instead of time > 250, things like that.It foes from state 3301 to 185, then to state 180 and finally returns to state 185. The problem is, he goes from 185 to 180 "too early", kinda not respecting the triggers I put in the ChangeState.Some screenies for moar help:After this state/tick, rugal goes to state 185 (his ending pose), so no problem till now but...Here, he's in state 185 (prevstateno being 3301), and all goes well till this point. Next tick will have him change abruptly to state 180 (which redirects him to state 185 but on another AnimElem), cutting off the full animation.Err... if you need more info, let me know.
QuoteHere, he's in state 185 (prevstateno being 3301), and all goes well till this point. Next tick will have him change abruptly to state 180 (which redirects him to state 185 but on another AnimElem)... ? At what point does prevstateno equal 3301 AND time has a chance of reaching 250 ? If you mean you don't want it to go to 180 too early... that's inbuilt, that's how the engine works, the character goes to state 180 when he wins, that's the roundstate. You can't change that. What you have to do is put a changeanim triggered correctly and not put the "anim" parameter in the state definition.
Very well then. I adjusted the coding. I was with the idea that you COULD delay reaching state 180, thus, the trigger with the time > 250.Thx.