[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, the command will return 1 on success and 0 on failure.
<RefObj> = The ship, which you want to check, if it's able to transport the selected <Var/Passenger>.
<Var/Passenger> = The passenger you want to transport with the <RefObj>.
This command will check if the selected <Var/Passenger> can be transported by the ship selected as <RefObj>. Therefore it will check if the <RefObj> has at least transport class M, an installed Cargo Life support system and at least 6 (for VIPs 8) units of free cargo space.
$ship = get player tracking aim
$passenger.arr = $ship -> get passenger array
$size.passenger.arr = size of array $passenger.arr
|$Passenger = $passenger.arr
|$transport = [PLAYERSHIP] -> can transport passenger: $Passenger
|if $transport == 1
||write to player logbook: printf: fmt='%s can transport passenger %s', [PLAYERSHIP], $Passenger, null, null, null
||write to player logbook: printf: fmt='%s cannot transport passenger %s', [PLAYERSHIP], $Passenger, null, null, null
|dec $size.passenger.arr =
This will get the player's currently selected target. Then it gets all passengers onboard the selected ship and checks if the [PLAYERSHIP] can transport one of the passengers. In case of success or failure an appropriate message will be written into the player's logbook.
- »» Trade Commands
- »» Passengers
<RetVar/IF><RefObj> can transport passenger:=<Var/Passenger>
- »» Passengers