State "queue"

Started by DingusMB, March 24, 2017, 07:45:27 PM

Previous topic - Next topic

DingusMB

One of my characters has Rugals Genocide Cutter , I was thinking of making it so if you press any kick button while its being executed hes going to like continue the combo even further and lose like half a power bar (at a certain frame maybe, I dont want the first one to be cut off in the middle). Kinda like an EX move but gives me room for more stuff.

Cant think of any characters with something similar to this so I decided to ask you guys

Odb718

I dont think you did. There's no question in your post..
You can do this a number of ways. You can do a change state inside the actual state with a varset/add when you press the button after a certain time, and animation frame. You can do the change state inside the cmd and set the buffer to the command to allow that queue effect.
vVv Gouken718 vVv SabreTooth718 vVv


DingusMB

You know what I meant, also thanks for replying again
Could you show me a quick example of one of these? I got something really simple that is really close to what i want

;------------------------------------------------
[State 1410, Combo]
type = ChangeState
trigger1 = command = "a" && movecontact
value = 1411
ctrl = 0
;------------------------------------------------

I mean, this works perfectly but it can still cut the animation in half, could a single additional trigger fix that?

Cyanide

Set the variable as said when the command is entered. Allow the state to leave at a specific time if said variable is active. You only need 1 var but multiple values

So say you enter the command for hadoken

type = varset
trigger1 = command = hadoken
var(0) = 1000

Type = changestate
trigger1 = time = 50 && movecontact
value = var(0)

So after 50 ticks have passed, you'll go to state 1000 if you entered the hadoken command.


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.

Odb718

#4
You'd want something like


[State 0, VarSet]  ;reset at the very beginning so the last time you hit it doesn't count
type = VarSet
trigger1 = time = 0
v = 10    ;fv = 10            ;this var can be use in multiple states for the same thing
value = 0
ignorehitpause = 0
[State 0, VarAdd] ;use add or set, which ever works for you
type = VarAdd
trigger1 = time >= 15   ;set this to what ever so you have to time the button press a little better.
trigger1 = command = "hadoken"
v = 10
value = 1
ignorehitpause = 1


[State 0, ChangeState]
type = ChangeState
trigger1 = var(10) = 1  ;if you use add, you'll want this to be != 0 because it could be a value other than 1 or 0.
trigger1 = time >= 21   ;these two times can be Cyanide's time too. His is more precise
trigger1 = time <= 35   ;sometimes you dont want it to activate too late
value = 718 ; whatever statedef you need active
ctrl = 0
ignorehitpause = 1


Like I commented, you can make 1 variable keep track of small stuff in your states for all of your states. Var(10) doesnt just have to be for this move. Because you reset it at time = 0, what happened before doesn't matter. If you reset it in those other states, it wont matter that you activated it for this state.

Cyanide said the same thing except not as long winded, and stringent.
vVv Gouken718 vVv SabreTooth718 vVv


DingusMB

I used two VarSets and it worked like a charm
Thank you both!

Odb718

Dont forget you can do this a couple different ways too.
One way I like to do is switch animations. The two animations flow on top of eachother so the player never notices the switch. Mugen has two different values, say anim 1000 and anim 1009. Just like your var(10).
Cyanide, I believe, likes to create explods. The fact that it exists is the second value. The explods would be transparent or off screen. Something the player wont see. But "root," knows the explod's every move every tic of the game.
vVv Gouken718 vVv SabreTooth718 vVv