five-on-it / packages/sim/src/vehicle / VehicleInputLike
Interface: VehicleInputLike
Defined in: packages/sim/src/vehicle.ts:56
The input a character or a driven vehicle acts on; the protocol's VehicleInput has the same shape.
Properties
action
action:
boolean
Defined in: packages/sim/src/vehicle.ts:68
Get in or out of a car (one-shot, rate limited).
aim
aim:
number
Defined in: packages/sim/src/vehicle.ts:74
Where the character faces and shoots: a yaw in radians (0 faces +z).
aimDistance
aimDistance:
number
Defined in: packages/sim/src/vehicle.ts:84
How far the cursor is from the character (m): where a grenade is thrown to.
boost
boost:
boolean
Defined in: packages/sim/src/vehicle.ts:72
In a car: boost (the throttle double-tapped and held); extra engine while the meter lasts.
cover
cover:
boolean
Defined in: packages/sim/src/vehicle.ts:78
Take cover at the wall ahead, or leave it (one-shot).
drop
drop:
boolean
Defined in: packages/sim/src/vehicle.ts:93
Drop the selected item at the character's feet (one-shot).
expose
expose:
boolean
Defined in: packages/sim/src/vehicle.ts:80
Out of cover: popped up to shoot and be shot.
fire
fire:
boolean
Defined in: packages/sim/src/vehicle.ts:76
Fire the weapon held: the selected slot's (held: automatic weapons repeat at their rate).
handbrake
handbrake:
boolean
Defined in: packages/sim/src/vehicle.ts:62
Handbrake held.
interact
interact:
boolean
Defined in: packages/sim/src/vehicle.ts:104
The interaction key is held: on foot at a locked car, it picks the lock (interaction.ts).
nextClass
nextClass:
boolean
Defined in: packages/sim/src/vehicle.ts:66
Switch to the next vehicle class (one-shot, rate limited).
phone
phone:
number
Defined in: packages/sim/src/vehicle.ts:114
What the player's phone is doing, for the others to see (acts.ts): 0 put away, 1 out in the hand, 2 held to the ear on a call, 3 in a conversation or at a screen of the world.
reset
reset:
boolean
Defined in: packages/sim/src/vehicle.ts:64
Reset to the nearest spawn (one-shot, rate limited).
resetLevel
resetLevel:
boolean
Defined in: packages/sim/src/vehicle.ts:86
Reset the whole level (one-shot; the server does it).
run
run:
boolean
Defined in: packages/sim/src/vehicle.ts:70
On foot: run instead of walk.
service
service:
number
Defined in: packages/sim/src/vehicle.ts:109
At the wheel of a car standing still in a garage (one-shot): 1 resprays it, 2 stores it (garages.ts); 0 asks nothing.
siren
siren:
boolean
Defined in: packages/sim/src/vehicle.ts:102
At the wheel of a class with a siren: run it (held: the horn key switches it on the client).
slot
slot:
number
Defined in: packages/sim/src/vehicle.ts:91
The selected slot of the character's inventory (0 to 15): the weapon it holds (an item that is no weapon, or none, the fists), what use and drop act on.
steer
steer:
number
Defined in: packages/sim/src/vehicle.ts:60
-1..1, positive = left.
target
target:
number
Defined in: packages/sim/src/vehicle.ts:82
Which target on the line of fire to shoot, nearest first (wraps).
throttle
throttle:
number
Defined in: packages/sim/src/vehicle.ts:58
-1..1.
transfer
transfer:
number
Defined in: packages/sim/src/vehicle.ts:100
Move an item between the character and the container it has open (one-shot): n > 0 takes the container's slot n − 1, n < 0 puts the character's slot −n − 1 in, 0 none.
use
use:
boolean
Defined in: packages/sim/src/vehicle.ts:95
Use the selected item (one-shot): a first-aid kit heals.