YesNoOk
avatar

Custom State Detection (Read 2301 times)

Started by Elix, October 08, 2007, 06:25:33 pm
Share this topic:
Custom State Detection
#1  October 08, 2007, 06:25:33 pm
  • ****
  • "Moyashi tsuku shite yaru..."
Has anybody though about it? How to determine whether a character exists in his own states or in his opponent's. The application of this issue, if it was resloved, is wide. For example, we can properly stop the looping sound when the character goes to custom state.
Re: Custom State Detection
#2  October 08, 2007, 06:54:50 pm
  • ******
  • [E]
    • Mexico
i can't remember the actual code, but yes, it has been done , it has somethign to do with the fact that st-2 is always executed and st-3 is executed only when you are on your own states.

i am not sure which is executed first, but it should be something like this:

in state-3

varX = 1

in between, put whatever you need to check for.

in state-2
var X = 0

when varX = 0 you are not in yoru states.

Bea

Re: Custom State Detection
#3  October 08, 2007, 08:16:57 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
In your statedef -3:

[state -3, something fancy here]
Type = VarSet
trigger1 = 1
var(1) = gametime

In your statedef -2
[state -2, check if I'm on a custom state]
Type = VarSet
trigger1 = 1
var(2) = var(1) = gametime

Statedef -3 is always processed first. Then we get statedef -2, -1 and the current player state.
Since statedef -3 is not processed while the player is on a custom state, var(2) will return 0 whenever he's on a custom state.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Custom State Detection
#4  October 08, 2007, 09:10:22 pm
  • ****
  • "Moyashi tsuku shite yaru..."
Re: Custom State Detection
#5  October 09, 2007, 05:39:53 am
  • ***
  • +1 to whoever added Godzilla to the main index.
Statedef -3 is always processed first. Then we get statedef -2, -1 and the current player state.
Since statedef -3 is not processed while the player is on a custom state, var(2) will return 0 whenever he's on a custom state.

And -2 and -1 are interpreted during a custom state, then?
i think we should call it an "engine" so we don't look like total idiots because otherwise we'd be arguing about a "game" and that would be somehow "dumber" than arguing about an "engine" on the "internet" for countless hours

Iced said:
I for one, do not enjoy round corners!  :bigcry:
But they hurt much less when we accidentally hit them!  :S
Re: Custom State Detection
#6  October 09, 2007, 07:38:41 am
  • ******
    • network.mugenguild.com/pots/
Use anything you want from my works.  If you need to contact me use email, not private messages.