Absolute SelfState

How Can We Help?

< Back

Concept

The only 100% fool proof way to ensure you never evaluate enemy state data is to Self State every frame.

There are certain design requirements for Statedefs to be compatible with Absolute SelfState

1. No Time Triggers (Time ALWAYS = 0)
2. Removing Statedef Parameters where applying 100% is a problem.
2A. Anim Parameter (ChangeAnim)
2B. VelSet Parameter (VelAdd/VelSet)
2C. Ctrl Parameter (CtrlSet)
2D. PowerAdd (Don’t even use this normally what’s wrong with you)
2E. FaceP2 (Would auto face every frame)
3. Add HitdefPersist/MoveHitPersist/HitCountPersist if required.

1. It is generally advised to use AnimElem and AnimElemTime and AnimElemNo(X) triggers in place of TIME
Otherwise you may use a variable that resets on entering state (to 0 time) and increased in -2 otherwise.

SelfState Var

SelfState based on the value of a variable (System variable recommended), can use separated sections of the same variable for different purposes if there is a high need to use all sysvars.

SelfState Anim

An alternative method involves linking Anim with StateNo, as the enemy cannot change your Anim as they can change your State before processing it is accurate even without a variable to log stateno.

This requires more specific coding to have 100% correlation with Anim and StateNo which is much harder to implement for converting pre-existing characters to Absolute SelfState, however it does not require a State Variable.
Note 100% relation is not required with more general logic, if Anim = X | Anim = Y | Anim = Z then SelfState > Var
In this case a super-temporary variable can be used instead of a sysvar if necessary.

SelfState Anim with Loose Correlation Example

[State -2]
Type = Null
TriggerAll = IsHelper = 0
TriggerAll =1 || Var(0) := 0
Trigger1 = Anim = [200,202]
Trigger1 = 1 || Var(0) := 200
Trigger2 = Anim = [210,211]
Trigger2 = 1 || Var(0) := 210
IgnoreHitPause = 1

[State -2]
Type = SelfState
Trigger1 = IsHelper = 0
Value = Var(0)
IgnoreHitPause = 1

Leave a comment

Your email address will not be published. Required fields are marked *