Namespace in reactor_vehicles.js

V

49 functions in 6 groups · hide internal

Vehicles from the Prop Builder.

Quick Reference

Setup & Creation 2

load() Loads the types once; a missing or malformed file is an empty list.
prepareTransfer() Prepare transfer.

Getting Information 6

idOf() Id of.
list() This map's vehicle events.
find() A vehicle of this map: an event, an event id, an identity "<mapId>:<eventId>", "ridden", "nearest", or a name…
getOn() Boards a vehicle by name, identity or event.
getOnStock() The party goes aboard the boat, the ship or the airship (type), wherever on this map it stands: it is put whe…
getOff() Gets the party off: braking first, then the hop.

Checks (True / False) 4

isReady() Whether it is ready.
isVehicle() Whether an event is a vehicle now: marked, not erased, and one of its pages in force.
isRiding() Whether it is riding.
isBusy() Whether a hop is running or a press to get off is kept: what the wait mode waits for.

Actions 6

putOnFoot() The party on foot where it stands.
setLocation() Puts a parked vehicle with its middle on (x + 0.5, y + 0.5), facing degrees.
moveTo() Puts a vehicle on tile (x, y) of any map, wherever it is now: what Set Vehicle Location does for it.
remove() Takes a parked vehicle out of the world; it is put back by setLocation.
addVisitingVehicles() The same for a map not yet entered ($dataMap being that map's data): a neighbor's parked vehicles stand at th…
resume() The map scene starts: events a save brought are matched to the data, and a ride a save or a reload of the map…

Updating & Drawing 1

refresh() A map whose events came from a save, not from setupEvents: an event the data has since made a vehicle is mark…

Other 30

degrees() Degrees.
radians() Radians.
term() Term.
free() False when the project's file switches the new vehicles off: each then stands as scenery.
type() A type record filled from its kind, or null where the list has none under that id.
words() Words.
any() Any.
battler() Battler.
sunk() Whether a vehicle stands under water deeper than it wades: where it sank, until it is walked or put out of it.
scenery() Why this version does not ride a vehicle here: "" when it does.
showsHere() Whether a vehicle has something to be drawn as on the map whose data is loaded now (asked on the way in, befo…
cancelTransfer() The ride does not go on to the map being entered: the vehicle and its convoy stay where they were parked.
where() Where a vehicle is: { map, x, y, z, yaw }, tiles as _realX, degrees.
ridden() The ridden vehicle's event, or null.
speed() Tiles a second, signed; 0 on foot.
park() Parks a vehicle where it stands: held by nobody, solid again, its place written.
landingSpot() Landing spot.
surfacePassable() Tile passage and authored 3D water for the selected travel medium.
fits() Whether the vehicle body fits at a heading and the nearest standing height.
offered() The vehicle OK boards now, or null.
prompt() Prompt.
riderInside() Whether a vehicle keeps its rider inside it (its Rider setting; left to itself, its kind unless its model pla…
hop() One tick of a hop: the player's place eases to where the hop ends, and the last tick seats the party or puts…
settle() Finishes a hop at once: seated, or on foot on its tile.
boardInFight() The leader gets on a vehicle during a battle on the map, at once: a unit's Mount.
seatFollower() One follower takes a vehicle of its own, at once.
unseatFollower() One follower gets off its vehicle, which is parked where it stands; the vehicle, or null.
sink() The ridden vehicle is in water deeper than it wades (bed: the ground under it).
sinkTick() One tick of a vehicle going down to the bed it sinks to.
bind() After the map's events were made again, or a save was loaded: the ridden vehicle is found by _rrRide and hold…

Setup & Creation

load

static source
V.load()

Loads the types once; a missing or malformed file is an empty list.

prepareTransfer

static source
V.prepareTransfer(mapId, x, y, direction)

Prepare transfer.

Getting Information

idOf

static source
V.idOf(event)

Id of.

list

static source
V.list()

This map's vehicle events.

Details

This map's vehicle events. The array is this module's: read it, do not keep or change it.

find

static source
V.find(what)

A vehicle of this map: an event, an event id, an identity "<mapId>:<eventId>", "ridden", "nearest", or a name (rrVehicle.key; of several that carry it, the nearest to the leader).

getOn

static source
V.getOn(what, options)

Boards a vehicle by name, identity or event.

Details

Boards a vehicle by name, identity or event. False when it cannot be boarded here.

getOnStock

static source
V.getOnStock(type)

The party goes aboard the boat, the ship or the airship (type), wherever on this map it stands: it is put where RPG Maker boards from (on the airship's tile; on a tile beside a boat or a ship, facing it), and RPG Maker's own boarding does the rest.

Details

The party goes aboard the boat, the ship or the airship (type), wherever on this map it stands: it is put where RPG Maker boards from (on the airship's tile; on a tile beside a boat or a ship, facing it), and RPG Maker's own boarding does the rest. False when the vehicle is on another map, switched off as rideable, has no tile beside it to board from, or the party already rides something.

getOff

static source
V.getOff(options)

Gets the party off: braking first, then the hop.

Details

Gets the party off: braking first, then the hop. With instant at once, and false when there is nowhere to stand.

Checks (True / False)

isReady

static source
V.isReady()

Whether it is ready.

isVehicle

static source
V.isVehicle(event)

Whether an event is a vehicle now: marked, not erased, and one of its pages in force.

isRiding

static source
V.isRiding(query)

Whether it is riding.

isBusy

static source
V.isBusy()

Whether a hop is running or a press to get off is kept: what the wait mode waits for.

Actions

putOnFoot

static source
V.putOnFoot()

The party on foot where it stands.

Details

The party on foot where it stands. Plain assignments on the player; the map's data and its events' data are not read, so it is safe while a transfer has already loaded the next map.

setLocation

static source
V.setLocation(what, x, y, degrees, z)

Puts a parked vehicle with its middle on (x + 0.5, y + 0.5), facing degrees.

Details

Puts a parked vehicle with its middle on (x + 0.5, y + 0.5), facing degrees. False where its body does not fit. Where a tile has several floors it arrives on the lowest it can stand on, as a transfer lands on the ground floor, whatever height it stood at before; with z (a height, as where() answers it), on the floor nearest that.

moveTo

static source
V.moveTo(identity, mapId, x, y)

Puts a vehicle on tile (x, y) of any map, wherever it is now: what Set Vehicle Location does for it.

Details

Puts a vehicle on tile (x, y) of any map, wherever it is now: what Set Vehicle Location does for it. A vehicle of the Vehicles page is named 0:<number>, a map's vehicle event <mapId>:<eventId>. On this map it is moved; from this map to another it leaves and waits there; from another map to this one it appears. Its heading is kept. False for one that is ridden, that the Database or the map does not have, or that does not fit there. A vehicle event never seen since the game began (its map's data not read) can be moved on its own map only: it stands there when that map is entered.

remove

static source
V.remove(what)

Takes a parked vehicle out of the world; it is put back by setLocation.

addVisitingVehicles

static source
V.addVisitingVehicles(mapId)

The same for a map not yet entered ($dataMap being that map's data): a neighbor's parked vehicles stand at the numbers its entry gives them (Reactor3D.Neighbors).

resume

static source
V.resume()

The map scene starts: events a save brought are matched to the data, and a ride a save or a reload of the map carried goes on exactly where it was (the reload puts the player on a whole tile).

Updating & Drawing

refresh

static source
V.refresh()

A map whose events came from a save, not from setupEvents: an event the data has since made a vehicle is marked where it stands, and one the data no longer makes a vehicle is an ordinary event again.

Other

degrees

static source
V.degrees(radians)

Degrees.

radians

static source
V.radians(degrees)

Radians.

term

static source
V.term(key)

Term.

free

static source
V.free()

False when the project's file switches the new vehicles off: each then stands as scenery.

type

static source
V.type(id)

A type record filled from its kind, or null where the list has none under that id.

Details

A type record filled from its kind, or null where the list has none under that id. The same object every time.

words

static source
V.words(type)

Words.

any

static source
V.any()

Any.

battler

static source
V.battler(what)

Battler.

sunk

static source
V.sunk(event)

Whether a vehicle stands under water deeper than it wades: where it sank, until it is walked or put out of it.

scenery

static source
V.scenery(event)

Why this version does not ride a vehicle here: "" when it does.

Details

Why this version does not ride a vehicle here: "" when it does. In this order: the project's switch ("free"), its type ("type", "kind"), the map ("flat", "loop", "firstPerson"), its model ("model").

showsHere

static source
V.showsHere(event)

Whether a vehicle has something to be drawn as on the map whose data is loaded now (asked on the way in, before that map's events are made).

cancelTransfer

static source
V.cancelTransfer()

The ride does not go on to the map being entered: the vehicle and its convoy stay where they were parked.

where

static source
V.where(what)

Where a vehicle is: { map, x, y, z, yaw }, tiles as _realX, degrees.

Details

Where a vehicle is: { map, x, y, z, yaw }, tiles as _realX, degrees. From its event, else from the registry.

ridden

static source
V.ridden()

The ridden vehicle's event, or null.

Details

The ridden vehicle's event, or null. While _vehicleType is "reactor" this answers an event of this map that is a vehicle, has a page in force and is boarded; when there is none the party is put on foot first, so no caller of vehicle() meets a null while isInVehicle() is true.

speed

static source
V.speed()

Tiles a second, signed; 0 on foot.

park

static source
V.park(event)

Parks a vehicle where it stands: held by nobody, solid again, its place written.

Details

Parks a vehicle where it stands: held by nobody, solid again, its place written. Its heading, height and pitch are kept.

landingSpot

static source
V.landingSpot(event, out)

Landing spot.

surfacePassable

static source
V.surfacePassable(type, x, y)

Tile passage and authored 3D water for the selected travel medium.

fits

static source
V.fits(event, x, y, radians, height)

Whether the vehicle body fits at a heading and the nearest standing height.

offered

static source
V.offered(now)

The vehicle OK boards now, or null.

Details

The vehicle OK boards now, or null. Looked for every LOOK ticks while a vehicle event is on the map; between looks the answer is kept, and it is null the moment the party is not free. now looks at once.

prompt

static source
V.prompt()

Prompt.

riderInside

static source
V.riderInside(event)

Whether a vehicle keeps its rider inside it (its Rider setting; left to itself, its kind unless its model places a seat).

hop

static source
V.hop()

One tick of a hop: the player's place eases to where the hop ends, and the last tick seats the party or puts it on foot.

Details

One tick of a hop: the player's place eases to where the hop ends, and the last tick seats the party or puts it on foot. A hop that is only drawn (a battle began aboard) counts its ticks and moves nothing.

settle

static source
V.settle()

Finishes a hop at once: seated, or on foot on its tile.

boardInFight

static source
V.boardInFight(event)

The leader gets on a vehicle during a battle on the map, at once: a unit's Mount.

Details

The leader gets on a vehicle during a battle on the map, at once: a unit's Mount. False when it cannot.

seatFollower

static source
V.seatFollower(follower, event)

One follower takes a vehicle of its own, at once.

Details

One follower takes a vehicle of its own, at once. False for a vehicle that is taken or is none.

unseatFollower

static source
V.unseatFollower(follower)

One follower gets off its vehicle, which is parked where it stands; the vehicle, or null.

Details

One follower gets off its vehicle, which is parked where it stands; the vehicle, or null. The follower is left where it is.

sink

static source
V.sink(bed, quiet)

The ridden vehicle is in water deeper than it wades (bed: the ground under it).

Details

The ridden vehicle is in water deeper than it wades (bed: the ground under it). Its rider is in the water where the vehicle is, on foot at once, afloat where the water is deep; the vehicle is nobody's and goes down to the bed (sinkTick), where it stays until it is boarded there and walked out, or put somewhere else. False when nobody rides, or a hop on or off is under way.

sinkTick

static source
V.sinkTick(event)

One tick of a vehicle going down to the bed it sinks to.

bind

static source
V.bind()

After the map's events were made again, or a save was loaded: the ridden vehicle is found by _rrRide and holds the carried state.

Details

After the map's events were made again, or a save was loaded: the ridden vehicle is found by _rrRide and holds the carried state. Returns it, or null on foot.