Both sides previous revisionPrevious revisionNext revision | Previous revision |
modding:function:shporder [2017/06/24 02:13] – Bold formatting for variables 0xabcdef | modding:function:shporder [2017/06/25 05:06] (current) – 0xabcdef |
---|
* **ship** | * **ship** |
* **order** | * **order** |
* **"guard"**: Ship docks with a target and fights enemies that attack or come near the target. Ship gives up attacking an enemy if it is no longer detectable to the target. Ends if **target** is destroyed. | * **"guard"**: Ship docks with a target and fights enemies that attack or come near the target. Ship gives up attacking an enemy if it is no longer detectable to the target. Ship is considered a subordinate of **target**. Order ends if **target** is destroyed. |
* SpaceObject: **target** | * SpaceObject: **target** |
* **"sentry"**: Similar to **guard** but makes the ship hold at its current position and has a duration. Ends when **target** is destroyed | * **"sentry"**: Similar to **guard** but makes the ship hold at its current position and has a duration. Usually given to ships that rotate but do not thrust (such as turrets). Ship is considered a subordinate of **target**. Order ends if **target** is destroyed. |
* SpaceObject: **target** | * SpaceObject: **target** |
* Integer: Duration in seconds; infinite by default. | * Integer: Duration in seconds; indefinite by default. |
* **"dock"**: Ship attempts to dock with a target. If no docking ports are available, ship will move back and forth over the target until a port is available. | * **"dock"**: Ship attempts to dock with a target. If no docking ports are available, ship will move back and forth over the target until a port is available. |
* SpaceObject: **target** | * SpaceObject: **target** |
* **"attack"**: Ship fires its weapons against a target for a specified duration or until the target is destroyed. | * **"attack"**: Ship fires its weapons against a target for a specified duration or until the target is destroyed. |
* SpaceObject: **target** | * SpaceObject: **target** |
* [Integer]: Duration in seconds; infinite by default | * [Integer]: Duration in seconds; indefinite by default |
* **"wait"**: Ship does absolutely nothing for a specified duration. | * **"wait"**: Ship does absolutely nothing for a specified duration. |
* [Integer]: Duration in seconds; infinite by default | * [Integer]: Duration in seconds; indefinite by default |
* **"gate"**: Ship attempts to leave the system through an object (typically a stargate). | * **"gate"**: Ship attempts to leave the system through an object (typically a stargate). |
* SpaceObject (does not need to be a stargate): **target** | * SpaceObject (does not need to be a stargate): **target** |
* **"gateOnThreat"**: Ship **wait**s until it is attacked and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. | * **"gateOnThreat"**: Ship **wait**s until it is attacked and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. |
* **"gateOnStationDestroyed"**: Ship **wait**s until a station is destroyed and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. | * **"gateOnStationDestroyed"**: Ship **wait**s until a station is destroyed and then attempts to leave the system. This order usually comes after a **dock** order. Ship is considered a subordinate of the object it is docked at. |
* **"patrol"**: Ship **orbit**s the target at a specified distance and fights enemies that attack or come near the target. Ship gives up fighting an enemy if it is no longer detectable by the target. | * **"patrol"**: Ship **orbit**s the target at a specified distance and fights enemies that attack or come near the target. Ship gives up fighting an enemy if it is no longer detectable by the target. Ship is considered a subordinate of **target**. Order ends if the **target** is destroyed. |
* SpaceObject: **target** | * SpaceObject: **target** |
* [Integer]: **distance** in light-seconds at which to orbit the target. | * [Integer]: **distance** in light-seconds at which to orbit the target. |
* **"hold"**: Ship brakes and attempts to stay at its current position, attacking nearby enemies | * **"hold"**: Ship brakes and attempts to stay at its current position, attacking nearby enemies |
* Integer: **duration** in seconds | * Integer: **duration** in seconds |
* **"mine"**: | * **"mine"**: Ship mines asteroids in the system. Ship is considered a subordinate of the **base**. |
* SpaceObject: **target** | * SpaceObject: **base** object that the ship is working for. |
* **"waitForPlayer"**: Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem**. Ship waits for the player to return to the system. | * **"waitForPlayer"**: Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem**. Ship waits for the player to return to the system. |
* **"attackPlayerOnReturn"**: Usually given during the **OnPlayerLeftSystem** event. Ship will attack player upon gating back into the system. | * **"attackPlayerOnReturn"**: Usually given during the **OnPlayerLeftSystem** event. Ship will attack player upon gating back into the system. |
* SpaceObject: **target** to wait for. | * SpaceObject: **target** to wait for. |
* Integer: **distance** from the target in light-seconds, defaults to detection range. | * Integer: **distance** from the target in light-seconds, defaults to detection range. |
* Integer: **duration** in seconds until the wait ends; infinite by default. | * Integer: **duration** in seconds until the wait ends; indefinite by default. |
* **"waitForEnemy"** | * **"waitForEnemy"**: Ship waits until it detects an enemy |
* Integer: **duration** in seconds until the wait ends; infinite by default. | * Integer: **duration** in seconds until the wait ends; indefinite by default. |
* **"bombard"**: Orders a ship to **attack** a station | * **"bombard"**: Orders a ship to **attack** a station |
* SpaceObject (must be a station): **target** | * SpaceObject (must be a station): **target** |
* Integer: **distance** in light-seconds | * Integer: **distance** in light-seconds |
* Integer: **duration** in seconds | * Integer: **duration** in seconds |
* **"holdCourse"**: | * **"holdCourse"**: Ship travels in a specified direction for a specified distance. |
* Integer: **angle** in degrees | * Integer: **angle** (absolute) in degrees |
* Integer: **distance** in light-seconds | * Integer: **distance** in light-seconds |
* **"turnTo"**: | * **"turnTo"**: Ship turns until its rotation matches a given angle. |
* Distance: **angle** (absolute) in degrees | * Distance: **angle** (absolute) in degrees |
* **"attackHold"**: | * **"attackHold"**: Ship attacks a specified target for a specified duration while trying to stay at its current position. |
* SpaceObject: **target** | * SpaceObject: **target** |
* Integer: **duration** in seconnds | * Integer: **duration** in seconds; indefinite by default. |
* **"attackStation"**: | * **"attackStation"**: |
* SpaceObject: **target** | * SpaceObject: **target** |
* SpaceObject: **target** | * SpaceObject: **target** |
* String: **event** to fire | * String: **event** to fire |
* **"waitForUndock"**: | * **"waitForUndock"**: Ship waits until the **target** undocks or the **duration** passes. |
* SpaceObject: **target** | * SpaceObject: **target** |
* Integer: **duration** | * Integer: **duration** in seconds |
* **"sendMessage"**: | * **"sendMessage"**: Ship sends a **message** to a **target**. If the **target** is the player ship, then the message displays on the screen. Otherwise, nothing useful happens. |
* SpaceObject: **target** | * SpaceObject: **target** |
* String: **message** | * String: **message** |
* SpaceObject: **target** | * SpaceObject: **target** |
* Integer: **distance** in light-seconds | * Integer: **distance** in light-seconds |
* [Integer]: **time** in seconds; infinite by default. | * [Integer]: **time** in seconds; indefinite by default. |
* **"holdAndAttack"**: Same as **attackHold** | * **"holdAndAttack"**: Same as **attackHold** |
* SpaceObject: **target** to attack | * SpaceObject: **target** to attack |
</code> | </code> |
| |
Orders a random ship in the system to gate out as soon as all its orders are done. | Orders a random ship in the system to exit through a random gate as soon as all its orders are done. |
| |
Return to [[:Functions]] list | Return to [[:Functions]] list |
| |