TrialPilot

Group
player
Methods
6
Fields
None

Getting one

player:sailing():pilot()

Methods

MethodReturnsDescription
start(PilotLap)(boolean, string?)Start a lap. Returns at once; the lap goes on by itself. A lap already under way is dropped, whether or not this one starts.
remaining({ number })()The lap's objectives still to do, as you read the game: their positions in the lap's order, from 1. Give it every tick: the pilot keeps no…
lightningStruck()()Tell the pilot a lightning strike hit the boat (the game's "A lightning strike reduces the speed of the boat!"): its reckoning of the boat'…
hold(number)()Click no heading for the next ticks ticks (a facility worked at the helm that steering would cancel), unless the boat's next move would p…
status()PilotStatusHow the lap stands, without advancing it. Its notes are handed over once.
stop()()End the lap and un-set the sails: the boat is not left sailing with nobody steering. The button is pressed at once where it can be, and aga…

Returned by

MethodReturnsDescription
Sailing.pilotTrialPilotThis plugin's trial pilot, which sails a lap of a Barracuda Trial on the boat the player is on. There is one per plugin, and one helm: its…

Method details

start

start: (TrialPilot, PilotLap) -> (boolean, string?)

Start a lap. Returns at once; the lap goes on by itself. A lap already under way is dropped, whether or not this one starts.

lap
The lap: its course, sea, order and planned laps.
Returns
true once the lap is started; else false and why (a text that does not read, a word of the order that is no crate, click or portal of the course, no planned lap).

remaining

remaining: (TrialPilot, { number }) -> ()

The lap's objectives still to do, as you read the game: their positions in the lap's order, from 1. Give it every tick: the pilot keeps no count of its own, and steers through these alone. One left out is done (and stays done for this lap).

positions
The positions still to do.

lightningStruck

lightningStruck: (TrialPilot) -> ()

Tell the pilot a lightning strike hit the boat (the game's "A lightning strike reduces the speed of the boat!"): its reckoning of the boat's rapid stacks falls as the game's does.

hold

hold: (TrialPilot, number) -> ()

Click no heading for the next ticks ticks (a facility worked at the helm that steering would cancel), unless the boat's next move would put it on rock.

stop

stop: (TrialPilot) -> ()

End the lap and un-set the sails: the boat is not left sailing with nobody steering. The button is pressed at once where it can be, and again over the next ticks until the boat reads stopped; a boat already at rest gets no click. The status reads "idle".