[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 you want to add the pilot of <Var/Ship> as passenger.
<Var/Ship> = The ship, whose pilot you want to add as passenger to the <RefObj>.
<Var/Boolean> = A [TRUE] or [FALSE] value.
This will add the pilot of the as <Var/Ship> selected ship as passenger to the <RefObj>. Therefore the <RefObj> must have an installed Cargo Lifesupport System, at least transport class M and at least 6 units free cargo space.
If <Var/Boolean> is [TRUE] the pilot of <Var/Ship> will be stored as passenger on the <RefObj>. The <Var/Ship> will have no pilot and all scripts running on the ship will be terminated, so it can be claimed.
If <Var/Boolean> is [FALSE] the pilot is stored on the <RefObj> as well, but the <Var/Ship> will get a new pilot of the same race and continue its job.
Example:
$target = get player tracking aim
$success = [PLAYERSHIP] -> add pilot of ship $target as passenger: disable ship=[TRUE]
if $success == 1
|$target -> set owner race to Player
else
|display subtitle text: text='Pilot couldn't be added as passenger!' duration=3000 ms
end
return null
This will add the pilot of the player's target to the [PLAYERSHIP] as passenger and change the owner of that ship to the player. In case it isn't possible to transfer the pilot, an appropriate message will be displayed as subtitle.
Unknown Outcomes:
Using this command on a ship which has a pilot, who was created by a 'special' script (e.g. Sector/Universe Trader or Commercial Agent) that adds certain attributes to the pilot.
I just had some short tests with sector traders. Although the name and his experience level remained, the pilot's race was always changed (e.g. a argon sector trader was changed to a paranid passenger). When <Var/Boolean> was [FALSE] the new pilot had the same race as the passenger.
Related Commands:
<RetVar/IF><RefObj> move passenger to ship <Var/Ship>: set passenger as pilot=<Var/Boolean>
Command Location:
- »» Trade Commands
- »» Passengers
<RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>
- »» Passengers