How do I go about coding V-Ism?

Started by Ryon, November 16, 2023, 03:18:09 AM

Previous topic - Next topic

Ryon

Hello, I'm working on someone and I wanted to add the V-Ism from Street Fighter Alpha 3.

and I don't mean the simply part about making combos less restrictive.

I'm talking about the secondary hit that happens after the first by the "afterimage"

Yes I know its a helper, but how would I ever code a helper to follow the players actions, seconds later?

Trololo

#1
Well, I looked into N-Mario's M.Bison, that got the V-Ism shadows pretty well, and here is how I understood their work:
-There is initial Helper state, let's call it "Pre-shadow", that generates multiple "Reader" helpers with the same state, but different IDs. After different amount ot time, that's never more than 60 ticks, it transits into the second. "Shadow" state.
[State 330, State]
type = ChangeState
trigger1 = Root, Var(2) < 2
trigger1 = Time >= 15
trigger2 = Root, Var(2) = 2
trigger2 = Time >= 36
trigger3 = Root, Var(2) > 2
trigger3 = Time >= 60
value = 331

-"Reader" helper's state in question, depending on its' ID, sets different variables to read Root's parameters, like direction, animation and ets. Here is the code for direction:
[State 340, VarSet]
type = VarSet
trigger1 = IsHelper(340)
var(StateTime%60) = Root, Facing

So, at state's time = 0, the var(0) = enemy turned to the right, at time 4, the var(4) = enemy turned to the right, and every 60 frames it resets back to var(0). It works, because there are exactly 60 variables available: from 0 to 59.
-That "Shadow" state itself reads every "reader" helper's variable value and applies it. The only thing that creates the delay between shadow and player is, again, the fact the state was changed from initial one after some time.
[State 330, Turn]
type = Turn
triggerall = NumHelper(340) > 0
trigger1 = (Helper(340), Var(StateTime%60) < 0) && (Facing = 1)
trigger2 = (Helper(340), Var(StateTime%60) > 0) && (Facing = -1)

As you can see, state reads the variable, depending on its' OWN time. So, when "Reader" helper's time var at the moment is, for example, 47, the variable "Shadow" state reads at the time = 0 is var(0).
You better look at the character by yourself though, to understand it better.