game.player.Gladiator — the gladiator the player is, and every verb of the fight.
Attached to mount_player by the scene entrypoint at play start. Once the
local avatar exists (R.live.avatar / "player.ready") it:
* dresses the builtin humanoid as a Roman gladiator (game.player.gear):
bronze crested galea, manica + spongia, red subligaculum, studded
balteus, greave, sandals, round bronze parma and the career's weapon;
* drives the CharacterController's input bus itself (move / sprint /
roll / lunge / stagger), owns the body's facing, and poses both arms
through an IKRig (guard, swings, block, roll, death);
* runs the fight: light (LMB) and heavy (RMB) attacks with windup /
active / recovery, block + parry (Shift / Q), dodge-roll with i-frames
(Space tap; hold Space to sprint), lock-on (Tab / MMB) that turns the
body and frames the target with the follow camera, stamina and hp,
armour and weapon from the career, hit reactions and death;
* publishes R.services.player and writes R.live.hp / stamina / lockTarget.
smooth(x: number) → number
small helpers
| arg | type | description |
|---|
| x | number | |
wrap(a: number) → number return
| arg | type | description |
|---|
| a | number | |
turnTo(target: number, maxStep: number) → void
| arg | type | description |
|---|
| target | number | |
| maxStep | number | |
fwd(y: number) → void
| arg | type | description |
|---|
| y | number | |
point(p: { number }) → void
| arg | type | description |
|---|
| p | { number } | |
sfx(name: string, pos: { number }?) → void
| arg | type | description |
|---|
| name | string | |
| pos | { number }? | |
maxHp( ) → number return R
maxSt( ) → number return R
spend(n: number) → void
| arg | type | description |
|---|
| n | number | |
A(b: { number }) → void
body point (right, up, forward) in the anchor frame -> world
| arg | type | description |
|---|
| b | { number } | |
Adir(b: { number }) → void
| arg | type | description |
|---|
| b | { number } | |
mix(a: any, b: any, t: number) → void
| arg | type | description |
|---|
| a | any | |
| b | any | |
| t | number | |
cameraBasis( ) → void
camera
aimCamera(yawFacing: number) → void
| arg | type | description |
|---|
| yawFacing | number | |
burst(pos: { number }, mat: string, n: number, speed: number, size: number) → void
fx
| arg | type | description |
|---|
| pos | { number } | |
| mat | string | |
| n | number | |
| speed | number | |
| size | number | |
tickFx(dt: number) → void
| arg | type | description |
|---|
| dt | number | |
setTint(on: boolean) → void
| arg | type | description |
|---|
| on | boolean | |
enemyAlive(id: string?) → any
lock-on
| arg | type | description |
|---|
| id | string? | |
lockHeight(info: any) → number
| arg | type | description |
|---|
| info | any | |
bestTarget(maxDist: number) → void
| arg | type | description |
|---|
| maxDist | number | |
setLock(id: string?) → void
| arg | type | description |
|---|
| id | string? | |
moveInputWorld( ) → void
the fight
aimAssist(reach: number) → void
turn to the nearest foe in front when swinging without a lock
| arg | type | description |
|---|
| reach | number | |
weaponReach(kind: string) → number
| arg | type | description |
|---|
| kind | string | |
startAttack(kind: string) → boolean
| arg | type | description |
|---|
| kind | string | |
request(kind: string) → void
| arg | type | description |
|---|
| kind | string | |
hurt(dmg: number, fromDir: { number }?) → void
| arg | type | description |
|---|
| dmg | number | |
| fromDir | { number }? | |
damage(amount: number, fromPos: any) → number
| arg | type | description |
|---|
| amount | number | |
| fromPos | any | |
damageInner(amount: number, fromPos: any) → void
| arg | type | description |
|---|
| amount | number | |
| fromPos | any | |
heal(n: number?) → void
| arg | type | description |
|---|
| n | number? | |
teleport(pos: any, yawDeg: number?) → void
| arg | type | description |
|---|
| pos | any | |
| yawDeg | number? | |
setControl(on: boolean) → void
| arg | type | description |
|---|
| on | boolean | |
spawnDummy(pos: any) → string
training palus: a registered enemy for drills and tests
onHit(amount: number, fromPos: any) → void
| arg | type | description |
|---|
| amount | number | |
| fromPos | any | |
tickDummies(dt: number) → void
| arg | type | description |
|---|
| dt | number | |
findSkinned(e: any) → any
building the gladiator on the avatar
spawnTarget(name: string, p: { number }) → void
| arg | type | description |
|---|
| name | string | |
| p | { number } | |
attachTo(avE: any) → boolean
tickFight(dt: number) → void
per-frame
| arg | type | description |
|---|
| dt | number | |
tickMove(dt: number) → void
| arg | type | description |
|---|
| dt | number | |
tickBody(dt: number) → void
| arg | type | description |
|---|
| dt | number | |
tickLock(dt: number) → void
| arg | type | description |
|---|
| dt | number | |
attack(kind: string?) → void
direct verbs (tests, cutscenes, touch UIs): same paths as the controls
| arg | type | description |
|---|
| kind | string? | |
block(on: boolean) → void
| arg | type | description |
|---|
| on | boolean | |
update(dt: number) → void
| arg | type | description |
|---|
| dt | number | |