SUBLIME TO GOD
A tutorial mini-site by Choon_2i
Based roughly on "Simply FPU" by Raymond Filiatreault

Chap. 2
State Controller Reference

HitDef

This state controller is essentially the bread and butter of most standard characters, functioning as the “standard attack” controller. In order for a HitDef to connect, the following conditions must be met, in order:

  1. The attacker's movetype isn't I.
  2. The attacker is not additionally performing a ReversalDef.
  3. The defender must be hittable by something.
  4. The attacker's HitDef must be active.
  5. The defender must be on the correct team (see affectteam).
  6. If the attack has a certain chainID, the defender must have a matching gethitvar(chainID) and must have most recently been hit by the attacker.
  7. If the attack has any noChainIDs and the defender was most recently hit by the attacker, the defender must not have a gethitvar(chainID) that matches any of them.
  8. The defender could not have been previously been hit by this exact HitDef from the attackerTechnically speaking, every time you use a HitDef, even if it originates from the same state controller, it counts as a different HitDef. This step is also checked twice, once using targets and once using a storage table..
  9. The defender's Z position is within range of the attacker's width.
  10. One of the attacker's hitboxes intercepts with one of the defender's hurtboxes.
  11. The defender can still be juggled by the attackerSemantically, this means that the attacker doesn't have NoJuggleCheck asserted or that the defender either isn't a target or the difference between the remaining juggle points and this HitDef's is non-negative..
  12. The defender is hittable by the attacker, according to the HitDef's hitflag.
  13. Change the HitDef attr's primary field to the attacker's statetype, if S, C, or A.
  14. The defender's combined (by masking) HitBy attrs can mask the attacker's HitDef attr.

In the context of nuke characters, the following parameters are worth noting:

attr = HITATTR

As you can probably guess, HITATTR is a HitAttr.
As stated in the above flowchart, this field can change directly before final hit detection. This allows for “unreversible” HitDefs to hit their opponents, but also allows them to potentially be reversed if the HitDef isn’t deactivated or replaced first.

affectteam = TEAMSIDE

TEAMSIDE can be either E, which specifies that it will attempt to hit Enemies, F, which specifies that it will attempt to hit Friends/allies, or B, which specifies that it will attempt to hit Both.
Defaults to E if unspecified.

pausetime = P1TIME(,P2TIME)?

On hit, the user’s buffered hitpausetime will be set to P1TIME, and the opponent’s hitshaketime will be set to P2TIME.
In addition, if a player is hit while a (Super)Pause is active and their respective movetime is less than P2TIME, it will be set to P2TIME.
Defaults to 0,0 if unspecified.
There is an on-guard equivalent, guard.pausetime, that defaults to pausetime if omitted.

hitonce = FLAG

If FLAG is non-zero, on contact, this HitDef will be automatically deactivated.
Defaults to 0 if unspecified, unless attr contains NT, ST, or HT, in which case it will default to 1.

priority = LEVEL,TYPE

LEVEL can be in between 1 and 7. If another HitDef’s hitbox overlaps with this HitDef’s hitbox, the HitDef with a lower LEVEL will be automatically deactivated.
If both HitDefs have equal level, TYPE is checked. If the TYPE of any HitDef’s priority is Dodge/D, both HitDefs are ignored. Otherwise, if the TYPE is Hit/H, it will hit, and if it’s Miss/M, it will be ignored.
Defaults to 4,Hit if unspecified.


ReversalDef

This state controller is identical to HitDef, and can have every parameter that HitDef can, as well as one other parameter, reversal.attr, which is a HitAttr that dictates which of a HitDef’s attr can be reversed. This can be emptyGiven that a ReversalDef takes every parameter a HitDef can, if you leave reversal.attr empty and additionally specify a non-empty attr, it becomes just a fancy HitDef..


RETURN TO
SUBLIME TO GOD
CONTENTS