I've spent 3 hours on a single line and it's starting to get boring...
Code: Select all
if [PLAYERSHIP] -> is docked
$Station = [PLAYERSHIP] -> get environment
$IsStationHasBeenExpanded = $Station -> get local variable: name='XM_HasBeenExpanded'
$StationPCMarines = $Station -> get local variable: name='XM_PCMarines'
$StationNbOfMarines = size of array $StationPCMarines
if $StationNbOfMarines > 0 AND $IsStationHasBeenExpanded == [TRUE]
$FreePlacesForMarines = [PLAYERSHIP] -> free space for marines
if $FreePlacesForMarines >= $StationNbOfMarines
$Station-> send incoming message: text=$MessageMarinesOnBoard temporary=[TRUE]
for each $PCMarine in array $StationPCMarines using counter $CountStationMarines
= $PCMarine -> add passenger to ship [PLAYERSHIP]
remove element from array $StationPCMarines at index $CountStationMarines
end
$Station -> set local variable: name='XM_PCMarines' value=$StationPCMarines
end
end
end
Code: Select all
= $PCMarine -> add passenger to ship [PLAYERSHIP]