Method to get list of state sequence names

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Proydoha
Posts: 70
Joined: Thu Jan 21, 2016 2:25 am

Method to get list of state sequence names

Post by Proydoha »

It would be great to have a method in zscript that could return list of state sequence names defined for an actor (and its parent classes).

So that, for example, it would be possible to write something like this:

Code: Select all

override void Tick()
{
    super.Tick();
    StateLabels[] = GetStateLabels();
    for(int i = 0; i < StateLabels.Size(); i++)
    {
        if (InStateSequence(curstate, FindState(StateLabels[i])))
        {
            console.printf("Current State: "..StateLabels[i]);
            break;
        }
    }
}

Return to “Feature Suggestions [GZDoom]”