YesNoOk
avatar

HitOverride (SCTRL) (Read 8484 times)

Started by Just No Point, 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
    • www.dailymotion.com/2a8130871d2742d2f4da3b069

  • Online
 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
    • deuceovspadez.webs.com/
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.