YesNoOk
avatar

HitOverride (SCTRL) (Read 28830 times)

Started by JustNoPoint, October 29, 2015, 11:32:46 pm
Share this topic:
HitOverride (SCTRL)
#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
Re: HitOverride (SCTRL)
#8  February 28, 2020, 12:33:35 am
  • avatar
    • USA
here's a question, is there a way to make it not change the state? (i feel like adding the same stateno would cause it to reset)
Re: HitOverride (SCTRL)
#9  February 28, 2020, 12:49:09 am
  • ****
  • CPU Purple Heart
    • USA
    • https://www.pixiv.net/en/users/8108265
 You can always have conditions for a stateno to only trigger once upon entering said stateno via hitoverride.

 Example would be setting animation not to change if the animation number already exists in the state.

 Otherwise, there is not unless you want to the hitoverride to literally do nothing ( you actually go into either stateno 5000 or 5020 for a tick when hitoverride occurs before going to your destination stateno, which is why prevstateno works strangely with hitoverride).

2OS

Re: HitOverride (SCTRL)
#10  July 30, 2020, 05:33:09 am
  • ****
  • 608 Wannabe
  • Ich schicke dich zur HOELLE!! STIRB DU FEIGLING!!
    • Egypt
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.

just for the record this information is false for the sctrl projectile; p1stateno and p2stateno is not disrupted there.
Re: HitOverride (SCTRL)
#11  February 25, 2022, 08:31:54 pm
  • ******
    • www.justnopoint.com/
If you wish to have a helper be immune to reversaldefs be sure that theu have a hitoverride set for everything that you want them to be immune for.

Even if you have them without CLSN or nothitby