News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Overriding ctrl = 0

Started by Hirosashii, March 05, 2013, 07:17:29 PM

Previous topic - Next topic

Hirosashii

I'm trying to make it so that I can take away control for a player for 20 ticks and then reissue them control after that time.  Right now I have

[State 5110, 16]
type = ChangeState
trigger1 = Time = 0
value = 1
ctrl = 0

to prevent them from having control.  Then I have

[State 5110, 18]
type = ChangeState
trigger1 = Time = 20
value = 0
ctrl = 1

to try overriding that first changestate 20 ticks after.  However, the player still doesn't have control of his/her character with this method.  Is this even possible to do?

Infinite Daze

Is this a custom state for p2 or a regular state for p1?

Ricepigeon

If its a custom state, wouldnt it be wiser to use targetstate instead?

Anyhow, did you try using a CtrlSet controller? You can read about it here

Odb718

With the fact that you change states to state 1 before the state even loads properly, I dont see how any of that would work.
Like RicePigeon mentioned you should probably be using ctrlset instead of changestate.
vVv Gouken718 vVv SabreTooth718 vVv


Infinite Daze

#4
If it is a custom state he needs to use a selfstate for a safe return to common states. I'm just hoping either way if it is for either p1 or p2 that he is not really doing this to state 5110 since that is the hit liedown common unless he is intentionally trying to ignore it's regular behaviors. Why would you have 2 changestates especially when you have the one you want at 20 ticks set after the one at 0 ticks? try removing the first changestate, also there usually is no state 1 so having that as a value with a 0 ctrl wouldn't work on a few levels.

Cyanide

Regardless of anything you need some method of timing this out as ctrl is in all sorts of states and attacks/getting hit will return it to you outside that 20 ticks.

The best way would be

type = ctrlset
trigger1 =
value = 0

You would then use a variable timer to time the 20 ticks. I would also suggest ctrl is reset when the variable becomes 1, so you don't wind up with ctrl = 1 at all times then the var decreases to 0. No persistent in state -2 rememeber. If this is for the opponent, just hit them and have it last 20 ticks, there is no other way to manage that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.