$MissionContext Properties

From Galactineers
Jump to: navigation, search

PlayersList

Contains the player Ids of all players in the mission. Player Ids can for example be used in the AddShip command to define a ship owner. The collection supports LINQ.

Example:

$firstPlayerId = $MissionContext->PlayersList[0];


PlayersShipList

Contains all ships controlled by the players. The collection supports LINQ. The ship objects in this collection have the following properties:

Properties
Propterty Type Description
ID integer The Id of the ship generated while using AddShip.
Name string The name of the ship.
Location.X, Location.Y Vector2D The current coordinates of the ship.
Owner string The owner of the ship.
Level integer The level of the ship.
$firstShip = $MissionContext->PlayersShipList[0];
$shipOwner = $firstShip.Owner;
$shipId = $firstShip.ID;

$numberOfShips = $MissionContext->PlayersShipList->Count;

$playerOneShips = from $MissionContext->PlayersShipList as $s where $s.Owner == $shipOwner select $s;


AlliesShipList

Contains all ships allied to but not controlled by the players. Supports LINQ. Works exactly like PlayersShipList

EnemiesShipList

Contains all ships hostile to the players. Supports LINQ. Works exactly like PlayersShipList