YesNoOk
avatar

HitOverride (SCTRL) (Read 2812 times)

Started by Just No Point, October 29, 2015, 11:32:46 pm
Share this topic:
HitOverride (SCTRL)
New #1  October 29, 2015, 11:32:46 pm
  • ******
    • www.justnopoint.com/
Defines a hit override. If the player is hit by an attack of the specified type, he will go to the specified state number instead of his default gethit behavior. Up to 8 hit overrides can be active at one time.

Required parameters:
attr = attr_string (string)
Standard hit attribute string specifying what types of hits to override. See HitDef's description for the "attr" parameter.

stateno = value (int)
Specifies which state to go into if hit by a HitDef with the specified attributes.

Optional parameters:
slot = slot_no (int)
Specifies a slot number (0 to 7) to place this hit override in. Defaults to 0 if omitted.

time = effective_time (int)
Specifies how long this hit override should be active. Defaults to 1 (one tick). Set this to -1 to have this override last until overwritten by another one.

forceair = value (boolean)
If set to 1, the player's gethit variables will be set as if he was in an aerial state when hit. Useful if you want to force the player to fall down from any hit. Defaults to 0 if omitted.

Notes:
If P1 has one or more active HitOverrides, P1 will not be affected by any of P2's matching HitDefs that have any of the following characteristics:

p1stateno parameter value is not -1
p2getp1state parameter value is 1

Example:
Code:
[State HitOverride]
type = HitOverride
trigger1 = time = [0,6]
attr = SCA, AA, AP, AT  ;Works against Standing, Crouching, and Air, All Attacks, All Projectiles, All Throws
stateno = 120     ;sends you back to guard
slot = 1
time = 1
forceair = 0
ignorehitpause = 1
;persistent = 
Last Edit: November 08, 2016, 04:35:03 pm by Odb718
Re: HitOverride (SCTRL)
#2  August 11, 2016, 09:19:01 pm
  • ******
    • www.justnopoint.com/
What exactly is the slot # for? If you have more than 1 do you need to set each slot number in a certain order up to 8 total Hit Overrides (0-7 = 8 Ints)?
Re: HitOverride (SCTRL)
#3  August 11, 2016, 09:29:40 pm
  • ****
  • Vs Style Debuts Tag Project CEO
  • The Dark Wolf Returns
    • USA
I was wondering how slot #s work because when I first coded in my OC, I was using HitOverride for the Dark Wolves and WereGarurumon helper states. I never understood what Slot # meant till now.
Beware the Dark Wolf once more!
Re: HitOverride (SCTRL)
#4  August 11, 2016, 09:34:21 pm
  • ******
    • www.justnopoint.com/
Well that's just my guess. I'm hoping someone with more knowledge can elaborate.
Re: HitOverride (SCTRL)
#5  August 11, 2016, 09:35:10 pm
  • ****
  • Target Acquired.
    • Ukraine
    • mugencoder.com
The Slot # is so you can have more than one active Hitoverride at one time. You'd need this is you had helpers that were overriding hits at the same time as your root. Without it, the last triggered Hitoverride would be the active one for that slot #.

-[Все слова это только слова.]-
Re: HitOverride (SCTRL)
#6  October 24, 2016, 02:01:57 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Something buried in the docs that has JUST come up in the help section.

Hitoverride does not play nice with p2stateno in a hitdef. If hitdef uses P2stateno, anything with a hitoverride is completely immune to it (assuming it would override etc etc) If i'm overriding projectiles, and you hit me with a projectile that has p2stateno on it, the projectile will miss exactly as if i had nothitby = SCA active.


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: HitOverride (SCTRL)
#7  October 24, 2016, 02:31:25 am
  • ******
    • www.justnopoint.com/
The same applies for P1StateNo

Unless this is the behavior you intend it's best to use ChangeState instead of P1StateNo and TargetState instead of P2StateNo