Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld 07a07267-3…

EnemyDirector

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

by◐lolboy21·posted 1mo ago
What it does

EnemyDirector

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

TODO: describe this component.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

EnemyDirector.component — the enemy force. Sits on `Mount_Enemy` under the scene's `Systems` entity. It owns the squad: it builds each soldier, gives each one a mind, ticks both, routes what the player's rounds hit back into damage, and routes what the squad's rounds hit back into the player's health. It renders nothing and decides nothing about how a soldier looks or how he thinks — `game.enemy.soldier` owns the body and `game.enemy.ai` owns the mind. What lives here is the seam between them and the rest of the game: the spawn points, the waves, the hit zones, and the two events that matter (`HIT` on a soldier, `PLAYER_DAMAGED` on the player). EVERY SOLDIER KNOWS ONLY WHAT HE SAW OR HEARD. The AI is handed the player's position but is free to use it only through `canSee`, which traces — so a soldier behind a wall does not react to a player he cannot see. That property is worth protecting: it is the single thing that separates this from a shooting gallery.

groundAt(x: ?, z: ?) → void

argtypedescription
x?
z?

buildRoute(lane: ?) → void

Building one soldier

argtypedescription
lane?

spawnSoldier(laneIndex: ?, nearPlayer: ?) → void

argtypedescription
laneIndex?
nearPlayer?

despawnEntry(entry: ?, index: ?) → void

argtypedescription
entry?
index?

onImpact(impact: ?) → void

Damage the player did A round the player fired struck a soldier. The zone comes from WHICH ENTITY the trace hit — a head is a different entity arriving, not a height compared against a threshold — and the damage is the same formula the weapon uses for everything else.

argtypedescription
impact?

onShot(shot: ?) → void

Noise the squad hears

argtypedescription
shot?

onFootstep(fs: ?) → void

argtypedescription
fs?

playerZoneFor(entityId: ?) → void

Damage the squad does The player's own body parts, by name, so a round that strikes the head is scored as a head hit and a round into the plate carrier is not.

argtypedescription
entityId?

soldierShot(entry: ?) → void

One round left a soldier's muzzle. It is traced for real, with the accuracy the AI earned, against the same world the player's rounds are traced in — so a wall between the two of them stops it, and a soldier who shoots through his own cover cannot happen.

argtypedescription
entry?

ctxFor(dt: ?) → void

Per frame

argtypedescription
dt?

onSpotted(a: ?, pos: ?) → void

argtypedescription
a?
pos?

suppressed(a: ?) → void

argtypedescription
a?

onShot(a: ?) → void

argtypedescription
a?

tick(dt: ?) → void

argtypedescription
dt?

awake( ) → void

Lifecycle

update(dt: ?) → void

argtypedescription
dt?

editorUpdate(dt: ?) → void

argtypedescription
dt?

status( ) → void

What the squad knows, for whoever wants to report it.

squad( ) → void

One row per soldier: where he is, what he is doing, and whether he can see the player right now. This is the surface a claim about the AI is checked against — "he reacted" is not something a capture can show.

onDestroy( ) → void

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

15+items
▣
module · born here
❒asset
# core <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# soldier <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
▣
module · born here
❒asset
# ai <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. --> TODO: describe this module.
▲ 0↑ born
backing path · game/enemy/EnemyDirector.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.