The if_docked mission scripting condition tests if a player ship is docked with a named station.
Attribute
|
Valid Values
|
Optional?
|
Description
|
name
|
text
|
Mandatory
|
The name of the station.
|
player_name |
text |
You only need to use one, either player_name, player_slot, OR use_gm_selection. |
The name of the player ship to test. If this attribute is absent, or if no ship exists with the indicated name, the ship in player slot 0 is tested. This attribute was added in Artemis v2.4. |
player_slot |
0-7 (corresponds to the 8 player ships allowed in the game) |
This attribute was supposedly added in Artemis v2.6.3, but as of v2.7.1 it still does not appear to work. |
use_gm_selection |
anything |
Use this attribute to use the game master's selected player ship. (This will fail if the selected object isn't a player ship.) This attribute was added in Artemis v2.6.3. |
not |
anything |
|
If present, inverts the logic of this command, to test if the player ship is NOT currently docked. This attribute was added in Artemis v2.6.3. |
To force testing a specific base or player ship that might or might not exist, this command must be paired with if_exists. If this is not done, the condition will always return if the first ship (in slot 0) is docked if the ship does not exist, or if the ship is docked with any base if the base does not exist.
For example:
<if_exists name="Intrepid" />
<if_exists name="DS1" />
<if_docked player_name="Intrepid" name="DS1" />
If your code tests if the player ship does not exist and ends the game in this case not then the former is not needed, but the latter still is.
Comments (0)
You don't have permission to comment on this page.