combatant

Opt-in combat. Uses stats health. Anatomical bone hurtboxes by default; authored hurtbox entities override them. Scripts: self.attack(move), self.block(on), self.dodge(), self.combat, self.hitscan(options), self.projectile(options). Damage notifications are combat_damage/combat_hit (already applied, never subtract again).

In scene text

combatant { team "…"  friendly_fire true  auto_hurtboxes true }

Add it in the Inspector (Add Component), in scene text as above, or ask your AI. Fields you leave out keep their defaults.

Fields 22

FieldTypeUnit / rangeWhat it does
teamtext—Same nonempty team is protected unless the attacker has friendly_fire.
friendly_firetrue / false—This fighter can damage its own team.
auto_hurtboxestrue / false—Use anatomical capsules when there are no authored hurtbox entities.
block_damagenumber0 … 1Damage fraction while blocking the incoming direction.
block_anglenumber0 … 180Guard half-angle in degrees from the fighter's front (-Z).
parry_windownumber0 … 1Seconds after raising the guard in which a melee blow from the front is parried: no damage, the attacker staggers (combat result "parried"). 0 never parries; souls-likes use about 0.15-0.2.
parry_staggernumber0 … 5How long a parried attacker is thrown off balance (an opening for a riposte).
head_damagenumber0 … 10Head zone damage multiplier.
limb_damagenumber0 … 10Arm/leg damage multiplier.
stagger_damagenumber0 … 100000Applied damage that staggers. It is also the fighter's poise: a smaller hit in the middle of its own move doesn't interrupt the swing (it flinches through it).
knockdown_damagenumber0 … 100000Applied damage that knocks down (at least stagger_damage).
knockdown_secondsnumber0.05 … 30Time under physics before getting up, unless dead.
getup_secondsnumber0.05 … 10Ragdoll-to-animation blend duration.
getup_cliptext—Recovery clip. The physics pose blends into this; idle is a generic stand-up fallback.
block_cliptext—Optional blocking animation; empty keeps the current pose.
dodge_cliptext—Animation played while dodging.
dodge_fpsnumber1 … 240Frames per second of dodge timing.
dodge_framesnumber1 … 2400Whole frames including dodge recovery.
invulnerable_startnumber0 … 2400First invulnerable frame (zero-based).
invulnerable_endnumber0 … 2400First vulnerable frame after dodge invulnerability (exclusive end).
ragdolltrue / false—Use existing physics joints for knockdowns and death when a humanoid rig is available.
layer_attackstrue / false—Attacks play on the upper body over the legs' locomotion (MotionBricks or clips) and the controls stay live: cutting while moving. Off: the move's clip takes the whole body and holds the controls.
Arcwright Beta 2 (0.4.0) · generated from the engine source (25e375c86)Something wrong or missing? Tell us
Download Arcwright free