I learnt that p1 can detect if they are in a custom state because -3 isn't processed then, while -2 is. So with a simple var, you could detect it like so:
In -3:
[State -3]
Type = VarSet
trigger1 = 1
var(1) = gametime
In -2:
[State -2]
Type = VarSet
trigger1 = 1
var(2) = var(1) = gametime
Var 2 should return 0 if p1 is in a custom state. I'd like to use this, but the char I'm editing no longer has any free vars for me to use.
Is there another way, independent of vars?
You can try to use a helper that doesn't have a destroyself sctrl and constantly updates itself at all times. Helper states don't share the same variable pool as the root/parent unless you use ParentVarset/ParentVarAdd.
Example:
;In Root/Parent states
[State 0, VarSet]
type = VarSet
trigger1 = time = 0
var(14) = 1
;In Helper State
[State 0, VarSet
type = VarSet
trigger1 = time = 0
var(14) = 1
If the helper uses Var(14), that variable is the helper's own variable as it doesn't share it with the root/parent so anything the root/parent uses that involves var(14) will have no effect on the helper nor will the helper's var(14) have any effect on the root/parent.