Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld 0fc7535e-6…

BenchGunner

BenchGunner is a gun that fires on its own, the way a player holding the trigger does: `rate` shots a second, each one a muzzle flash at the gun, a tracer down its aim and an impact where the round lands. The gun aims along its entity's forward (-Z). It holds one effect of each k…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

BenchGunner

BenchGunner is a gun that fires on its own, the way a player holding the trigger does: rate shots a second, each one a muzzle flash at the gun, a tracer down its aim and an impact where the round lands. The gun aims along its entity's forward (-Z). It holds one effect of each kind for as long as it exists, and a shot plays each of them again from its start.

The bench_mixed scene uses it. Its build script spawns eight guns, BenchGun1 to BenchGun8, as children of BenchRange, each with rate = 11 and distance = 30, to stand in for eight players holding the trigger.

The three effects are procGraph assets played through Generator components, by default effects.combat.muzzleFlash, effects.combat.tracer and effects.combat.impact.

Fields

FieldTypeDefaultDescription
ratenumber11Shots per second.
distancenumber30How far down the aim the rounds land, in metres.
muzzleFlashassetRef (procGraph)effects.combat.muzzleFlashThe flash at the gun on each shot.
tracerassetRef (procGraph)effects.combat.tracerThe round's trail down the aim.
impactassetRef (procGraph)effects.combat.impactWhat a round does where it lands.

All fields are Sync.

Lifecycle

  • start(): spawns one temporary child entity per effect field that names an asset, each with a Generator set to that graph and playOn = "manual". muzzle and tracer stand at the gun's origin, and the tracer's Generator gets the parameter distance. impact stands at { 0, 0, -distance } in the gun's space, turned to face back up the aim toward the gun.
  • update(dt): while rate is above 0, it accumulates dt * rate shots, held at most 2, and fires one shot per whole shot owed. A long frame fires at most one shot more than a short one. A shot calls seek(0) and then play() on each of the three Generators.
  • onDestroy(): despawns the child effects.

Usage

local gun = entity.spawn("BenchGun1")
gun.component.add("BenchGunner", { rate = 11, distance = 30 })

Interface

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

conforms to

zero/source-extract/v2

component

Generator

effect(name: string, graph: any, at: { number }, rotation: any, params: { [string]: any }) → any

One child standing at `at` (in the gun's own space), turned by `rotation`, playing `graph` when told to.

argtypedescription
namestring
graphany
at{ number }
rotationany
params{ [string]: any }

arm( ) → void

drop( ) → void

fire( ) → void

start( ) → void

update(dt: number) → void

argtypedescription
dtnumber

onDestroy( ) → void

⌬ Metadata
descriptionA gun that fires on its own at a set rate, playing a muzzle flash, tracer and impact effect for each shot, for benchmark workloads.

Sub-parts

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

3items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · bench/BenchGunner.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. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬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.