| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

if_in_nebula

Page history last edited by Dave Thaler 6 years, 1 month ago

The if_in_nebula mission scripting condition tests if a player ship is in a nebula of a given type, or is not in any nebula.

 

Attribute

Valid Values

Optional?

Description

name text You only need to use one, either name, player_slot, OR use_gm_selection. The name of the player ship to test.
player_slot 0-7  (corresponds to the 8 player ships allowed in the game)  
use_gm_selection anything Use this attribute to use the game master's selected player ship.
compare 0-3 (integer) Mandatory  If 0, tests if the ship is NOT in a nebula.  Otherwise, tests if the ship is in a nebula of the specified type.  The value is the number used in the "nebType" attribute when creating nebulas.

 

To test if a player ship is in any kind of nebula, you must use three separate events that each check a different nebula type.  For example, the following snippet sets a variable to the type of nebula (or 0) that Artemis is in:

 

  <event name="Artemis not in nebula">
    <if_in_nebula name="Artemis" compare="0" />
    <if_variable name="ArtemisNebulaType" comparator="NOT" value="0.0" />
    <set_variable name="ArtemisNebulaType" value="0" />
  </event>
  <event name="Artemis in nebType 1">
    <if_in_nebula name="Artemis" compare="1" />
    <if_variable name="ArtemisNebulaType" comparator="NOT" value="1.0" />
    <set_variable name="ArtemisNebulaType" value="1" />
  </event>
  <event name="Artemis in nebType 2">
    <if_in_nebula name="Artemis" compare="2" />
    <if_variable name="ArtemisNebulaType" comparator="NOT" value="2.0" />
    <set_variable name="ArtemisNebulaType" value="2" />
  </event>
  <event name="Artemis in nebType 3">
    <if_in_nebula name="Artemis" compare="3" />
    <if_variable name="ArtemisNebulaType" comparator="NOT" value="3.0" />
    <set_variable name="ArtemisNebulaType" value="3" />
  </event>

 

Comments (0)

You don't have permission to comment on this page.