YesNoOk
avatar

Detecting Custom States without variables? (Read 349 times)

Started by Disconcorde, October 03, 2019, 01:11:12 am
Share this topic:
Detecting Custom States without variables?
#1  October 03, 2019, 01:11:12 am
  • avatar
  • *
    • UK
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:

Code:
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?
Last Edit: October 04, 2019, 04:43:02 pm by Disconcorde
Re: Detecting Custom States without variables?
#2  October 03, 2019, 02:20:19 am
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
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:
Code:

;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.

Beware the Dark Wolf once more!
Last Edit: October 03, 2019, 03:16:33 am by DarkWolf13
Re: Detecting Custom States without variables?
#3  October 03, 2019, 08:04:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Unless you meant to redirect there... hes got no variables free. Explods if your detection doesn't have to be instant.

State -3. Keep creating an invisible explod with a removetime of 1. State -2 detect if the explod exists. If you're in a custom state you'll stop spawning it. Might be a 1 tick delay though.


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.
Re: Detecting Custom States without variables?
#4  October 03, 2019, 07:16:31 pm
  • ******
    • www.justnopoint.com/
There is no delay unless the explod is created by a helper
Re: Detecting Custom States without variables?
#5  October 04, 2019, 04:43:28 pm
  • avatar
  • *
    • UK
@Cyanide

Your explod method worked! Thanks.