User Tools

Site Tools


modding:function:shporder

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
modding:function:shporder [2014/12/27 04:40] – external edit 127.0.0.1modding:function:shporder [2017/06/23 23:24] – More order info 0xabcdef
Line 13: Line 13:
 ^ Description | Gives the ship the order. | ^ Description | Gives the ship the order. |
  
-=== Variations === +  * **shpOrder** 
- +    * **ship** 
-  (shpOrder source 'waitForTarget target) +      * **order*
-  (shpOrder source 'attack target) +        "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. 
-  (shpOrder source 'dock target) +          SpaceObject: Target 
-  (shpOrder source 'escort target) +        * "sentry": Similar to **guard** but makes the ship hold at its current position and has a duration. 
-  * (shpOrder source 'hold Nil 5+          * SpaceObject: Target 
-  * (shpOrder source 'gate+          * Integer: Duration in seconds; infinite by default. 
-  * (shpOrder source 'wander) +        * "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. 
-  (shpOrder source 'hold) +          SpaceObject: Target 
-  (shpOrder source 'wait Nil (random 3 7)) +        * "attack": Ship fires its weapons against a target for a specified duration or until the target is destroyed. 
-  (shpOrder source 'goto target) +          SpaceObject: Target 
-  * (shpOrder source 'patrol target distance) +          * [Integer]: Duration in seconds; infinite by default 
-  (shpOrder source 'aim target) +        * "wait": Ship does absolutely nothing for a specified duration 
-  (shpOrder source 'guard target) +          * [Integer]: Duration in seconds; infinite by default 
-  * (shpOrder wingman 'attackNearestEnemy+        * "gate": Ship attempts to leave the system through an object (typically a stargate
-  * (shpOrder source 'bombard target) +          SpaceObject (does not need to be a stargate): Target 
-  * (shpOrder source 'approach marker 15+        * "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. 
-  * (shpOrder source 'turnTo 90+        * "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. 
-  * (shpOrder source 'holdCourse ??+        * "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. 
-  * (shpOrder source 'turnTo angle; added in 1.03 +          * SpaceObject: Target 
 +          * [Integer]: Distance at which to orbit the target. 
 +        * "escort": Ship **follow**s a target, fighting enemies that attack or come near the target.  Ship gives up fighting an enemy if it is no longer detectable by the target. 
 +          * SpaceObject: Target 
 +          * [Integer]: Angle or Formation 
 +          * [Integer]: Distance 
 +        * "scavenge": Ship **wanders** around system until there is a wreck with items in it, at which point the ship will **loot** the wreck. Does not retaliate if the wreck is destroyed. 
 +        * "followPlayerThroughGate": Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem** as **"followPlayer"**. Ship follows the player through the nearest gate. 
 +          * SpaceObject: Target 
 +        * "attackNearestEnemy" 
 +        * "tradeRoute" 
 +        * "wander": Ship follows a diamond-like path around the system, fighting enemies that attack it 
 +        "loot": Ship takes all items from the target after a few seconds, ignoring cargo space. Ship does not retaliate to attacks while looting. Does not retaliate if target is destroyed. 
 +          * SpaceObject: Target 
 +        * "hold": Ship brakes and attempts to stay at its current position, attacking nearby enemies 
 +          * Integer: Duration 
 +        * "mine" 
 +          * SpaceObject: Target 
 +        * "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. 
 +        * "follow": Ship follows a target, staying at a position relative to the target and matching the target's direction. 
 +          * SpaceObject: Target 
 +          * Integer: Angle in degrees 
 +          * Integer: Distance in light-seconds 
 +        * "navPath" 
 +          * Integer ((Unknown)) 
 +        "goto
 +          * Object 
 +        * "waitForTarget": Ship waits until a target approaches a certain distance or until a certain amount of time passes. 
 +          SpaceObject: Target to wait for. 
 +          * Integer: Maximum distance from the target in light-seconds, defaults to detection range. 
 +          * Integer: Maximum duration in seconds until the wait ends; infinite by default. 
 +        * "waitForEnemy" 
 +          * Duration: Maximum duration in seconds until the wait ends; infinite by default. 
 +        * "bombard": Orders a ship to **attack** a station 
 +          * SpaceObject (must be a station): Target 
 +          * Integer: Duration in seconds that the ship will spend bombarding 
 +        * "approach": Ship approaches a target until a certain distance 
 +          SpaceObject: Target 
 +          * Distance: Distance in light-seconds 
 +        * "aim": Ship aims at a target without firing weapons 
 +          SpaceObject: Target 
 +        * "orbit": Ship moves clockwise in a circular path around the target at a specified distance for a specified duration 
 +          SpaceObject: Target 
 +          * Integer: Distance in light-seconds 
 +          * Integer: Duration in seconds 
 +        * "holdCourse" 
 +          * Angle 
 +          * Distance 
 +        * "turnTo" 
 +          * Angle (absolute
 +        "attackHold" 
 +          * Target 
 +          * Duration 
 +        * "attackStation" 
 +          * Target 
 +          * Integer ((Unknown)) 
 +        * "fireEvent" Fires the event on the target's event handler. **aShipObj** is the ship that fired it. 
 +          * Target 
 +          * String (event name
 +        "waitForUndock" 
 +          * Target 
 +          * Duration 
 +        * "sendMessage" 
 +          * Target 
 +          * Message 
 +        * "attackArea" 
 +          * Target ((Unknown)
 +          Integer ((Unknown)
 +          Integer ((Unknown)
 +        "holdAndAttack" 
 +          * Target 
 +          * Integer ((Unknown)
 +        * "gotoPos" 
 +          * Position vector 
 +        * "waitForThreat" 
 +          * Duration
 === Example === === Example ===
  
modding/function/shporder.txt · Last modified: 2017/06/25 05:06 by 0xabcdef