command buffering

Started by Bastard Mami, November 21, 2007, 10:51:19 PM

Previous topic - Next topic

Cyanide

Ok, so how about

Movecontact > number.

Movehit > 20 for eg would be very similar to an attack triggering after the hitpause. You're making movehit take the place of it.

Technically you're setting the cmd up partially in the .cns. You could assign variables directly to the moves in the cmd when they're activated.

Then use that variable to changestate if it's set in the .cns.

Urgh, i can't explain that in text but it makes perfect logical sense in my head.

I'd have to try it out, but can't right now. Sounds less awkward than the other methods.


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.

Bastard Mami

back to the topic's title.. let's talk about real command buffering.

i think the helper approach is good, so, in the changestate instead of checking for command="ASSAD", you check for helper, stateno = asasdd...now,a bout actual imlementation, this is theoric and based only on my experience with a helper based ai.

we use state 200,000 for the initial helper state, state 200,000, in a way would be a "no command" condition.

if parent, command = X , we change to state 200,100; now, to buffer the command, after 5 ticks of being in state 200,101 , now  in the cmd, we change command = X to helper,stateno = 200,101.. this way we manage to offtime the commands so they trigger later.

now, to make them false, we just changestate, when time > 3 on stateno 200,101 to stateno 200,000.

now, there is a big problem, if we only check for commands in state 200,000, we can't input more complex commands while we are in the inside states... so the helper must have access to the negative states. another way would be using varsets, as if the vars were states.

Elix

Quote from: R[E]ika on December 08, 2007, 12:21:58 AM
another way would be using varsets, as if the vars were states.
This is what I've been proposing all the time.
Quote from: P.o.t.S. on November 22, 2007, 02:21:04 AM
Like the jump-in example you mentioned, I recall that if you input a command right before you land you'll get an aerial normal according to the button you pressed, but if you hold that button until you land you'll get the aerial normal and the ground normal of the same button, so that's two attacks with a single button press which is useful if you screw up the timing of a jump-in special.
You set the buffer time accordingly. You should not make it too large or too small. So when you press kick button right before you land character will start executing aerial kick but will never reach past 1st frame. Instead, standing kick will be executed on landing. I set buffer time to '4' for all button presses.
Quote from: P.o.t.S. on November 22, 2007, 02:21:04 AM
Why do you need to reset it? Roundstate triggers in the changestates should be enough I suppose.
Hmmm. That indeed could be enough. But I want everything to be rational in my code. Besides, resetting a var will save much text in .cmd :)

Bastard Mami

if the var/state is used as a command, there will not be the "aerial attack trigger on the ground" problem.

Elix

Who said there was such a problem?