GlHero
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
GlHero
<!-- 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/v2gl.hero.GlHero — SLICE 1: the player's body, movement and the feel of the fight. Attach to `Mount_Player`. The engine already gives every joining player a humanoid body with a CharacterController and a third-person camera (the scene's PlayerPrototype). This slice does NOT build a second rig — that breaks the moment a second player joins. It dresses the body the engine made, reads the controls the engine publishes, and resolves combat through the progression hub. Controls (keyboard): W A S D walk Shift sprint Space dodge-roll (brief invulnerability) F / LMB sword swing combo Q Devil Fruit ability 1 E ability 2 R lock on / off Publishes: state() -> { hp, hpMax, energy, energyMax, attacking, dodging, locked } swing() -> resolve one blow (what F does, callable from a UI button too) ability(i) -> fire a fruit ability
hub( ) → any
playerBody( ) → any
keyDown(keys: { string }, code: string) → boolean
| arg | type | description |
|---|---|---|
| keys | { string } | |
| code | string |
awake( ) → void
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
t_now( ) → number
Time source for the combo window. `os.clock()` is monotonic in this engine and does not depend on the frame.
swing( ) → any
Resolve one sword swing. Finds the locked target (or the nearest enemy in reach) and lands a blow whose damage grows with the combo step and the equipped sword.
ability(index: number) → any
Fire a Devil Fruit ability through the progression hub. (1 or 2.)
| arg | type | description |
|---|---|---|
| index | number |
state( ) → any
What the hero is doing right now.
setLock(on: boolean) → void
Toggle lock-on.
| arg | type | description |
|---|---|---|
| on | boolean |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ 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".
Scoped to this part · feeds back into the world's score.