User Tools

Site Tools


modding:function:shporder

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
modding:function:shporder [2017/06/23 23:24] – More order info 0xabcdefmodding:function:shporder [2017/06/24 02:32] 0xabcdef
Line 16: Line 16:
     * **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. +        * **"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
-          * SpaceObject: Target +          * SpaceObject: **target** 
-        * "sentry": Similar to **guard** but makes the ship hold at its current position and has a duration. +        * **"sentry"**: Similar to **guard** but makes the ship hold at its current position and has a duration. Ends when **target** is destroyed 
-          * SpaceObject: Target+          * SpaceObject: **target**
           * Integer: Duration in seconds; infinite by default.           * Integer: Duration in seconds; infinite 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; infinite 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; infinite 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. 
-          * SpaceObject: Target +          * SpaceObject: **target** 
-          * [Integer]: Distance at which to orbit the target. +          * [Integer]: **distance** in light-seconds 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. +        * **"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 +          * SpaceObject: **target** 
-          * [Integer]: Angle or Formation +          * [Integer]: **angle** or **formation** 
-          * [Integer]: Distance +          * [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. +        * **"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. +        * **"followPlayerThroughGate"**: Cannot be given by **shpOrder**; returned by the event **OnPlayerLeftSystem** as **"followPlayer"**. Ship follows the player through the nearest gate. 
-          * SpaceObject: Target +          * SpaceObject: **target** 
-        * "attackNearestEnemy" +        * **"attackNearestEnemy"**: Attack the nearest enemy at the time that this order is assigned. 
-        * "tradeRoute" +        * **"tradeRoute"** 
-        * "wander": Ship follows a diamond-like path around the system, fighting enemies that attack it +        * **"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. +        * **"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 +          * SpaceObject: **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 +          * Integer: **duration** in seconds 
-        * "mine" +        * **"mine"**: 
-          * SpaceObject: Target +          * SpaceObject: **target** 
-        * "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. 
-        * "follow": Ship follows a target, staying at a position relative to the target and matching the target's direction. +        * **"follow"**: Ship follows a target, staying at a position relative to the target and matching the target's direction. 
-          * SpaceObject: Target+          * SpaceObject: **target**
           * Integer: Angle in degrees           * Integer: Angle in degrees
           * Integer: Distance in light-seconds           * Integer: Distance in light-seconds
-        * "navPath" +        * **"navPath"** 
-          * Integer ((Unknown)) +          * ?: **navID** 
-        * "goto" +        * **"goto"**:  
-          * Object +          * SpaceObject: **destination** 
-        * "waitForTarget": Ship waits until a target approaches a certain distance or until a certain amount of time passes. +          * Integer: **distance** 
-          * SpaceObject: Target to wait for. +        * **"waitForTarget"**: Ship waits until a target approaches a certain distance or until a certain amount of time passes. 
-          * Integer: Maximum distance from the target in light-seconds, defaults to detection range. +          * SpaceObject: **target** to wait for. 
-          * Integer: Maximum duration in seconds until the wait ends; infinite by default. +          * Integer: **distance** from the target in light-seconds, defaults to detection range. 
-        * "waitForEnemy" +          * Integer: **duration** in seconds until the wait ends; infinite by default. 
-          * DurationMaximum duration in seconds until the wait ends; infinite by default. +        * **"waitForEnemy"** 
-        * "bombard": Orders a ship to **attack** a station +          * Integer**duration** in seconds until the wait ends; infinite by default. 
-          * SpaceObject (must be a station): Target +        * **"bombard"**: Orders a ship to **attack** a station 
-          * Integer: Duration in seconds that the ship will spend bombarding +          * SpaceObject (must be a station): **target** 
-        * "approach": Ship approaches a target until a certain distance +          * Integer: **duration** in seconds that the ship will spend bombarding 
-          * SpaceObject: Target +        * **"approach"**: Ship approaches a target until a certain distance 
-          * DistanceDistance in light-seconds +          * SpaceObject: **target** 
-        * "aim": Ship aims at a target without firing weapons +          * Integer**distance** in light-seconds 
-          * SpaceObject: Target +        * **"aim"**: Ship aims at a target without firing weapons 
-        * "orbit": Ship moves clockwise in a circular path around the target at a specified distance for a specified duration +          * SpaceObject: **target** 
-          * SpaceObject: Target +        * **"orbit"**: Ship moves clockwise in a circular path around the target at a specified distance for a specified duration 
-          * Integer: Distance in light-seconds +          * SpaceObject: **target** 
-          * Integer: Duration in seconds +          * Integer: **distance** in light-seconds 
-        * "holdCourse" +          * Integer: **duration** in seconds 
-          * Angle +        * **"holdCourse"**: 
-          * Distance +          * Integer: **angle** in degrees 
-        * "turnTo" +          * Integer: **distance** in light-seconds 
-          * Angle (absolute) +        * **"turnTo"**: 
-        * "attackHold" +          * Distance: **angle** (absolute) in degrees 
-          * Target +        * **"attackHold"**: 
-          * Duration +          * SpaceObject: **target** 
-        * "attackStation" +          * Integer: **duration** in seconnds 
-          * Target +        * **"attackStation"**: 
-          * Integer ((Unknown)) +          * SpaceObject: **target** 
-        * "fireEvent" Fires the event on the target's event handler. **aShipObj** is the ship that fired it. +          * [?]: **unknown** 
-          * Target +        * **"fireEvent"**: Fires the event on the target's event handler. **aShipObj** is the ship that fired it. 
-          * String (event name) +          * SpaceObject: **target** 
-        * "waitForUndock" +          * String: **event** to fire 
-          * Target +        * **"waitForUndock"**: 
-          * Duration +          * SpaceObject: **target** 
-        * "sendMessage" +          * Integer: **duration** 
-          * Target +        * **"sendMessage"**: 
-          * Message +          * SpaceObject: **target** 
-        * "attackArea" +          * String: **message** 
-          * Target ((Unknown)) +        * **"attackArea"**: Ship attacks all enemies that are within a specified distance of a specified object for a specified time, probably in random order<sup>verify</sup> 
-          * Integer ((Unknown)) +          * SpaceObject: **target** 
-          * Integer ((Unknown)) +          * Integer: **distance** in light-seconds 
-        * "holdAndAttack" +          * [Integer]: **time** in seconds; infinite by default. 
-          * Target +        * **"holdAndAttack"**: Same as **attackHold** 
-          * Integer ((Unknown)) +          * SpaceObject: **target** to attack 
-        * "gotoPos" +          * Integer: **duration** in seconds 
-          * Position vector +        * **"gotoPos"**: Ship moves to the specified position. 
-        * "waitForThreat" +          * Position: **destination** 
-          * Duration+        * **"waitForThreat"**: Ship waits until it detects an enemy or the **duration** passes. 
 +          * Integer: **duration** in seconds
 === Example === === Example ===
  
-<code lisp>(shpOrder gPlayerShip 'wait)</code>+<code lisp> 
 + (shpOrder 
 + (random (sysFindObject Nil "s A")) 
 + 'gate 
 + (random (sysFindObject Nil "G A")) 
 + ) 
 +</code> 
 + 
 +Orders a random ship in the system to exit through a random gate as soon as all its orders are done.
  
-Returns True, ordering the player to wait doesn't do much. 
 Return to [[:Functions]] list Return to [[:Functions]] list
  
modding/function/shporder.txt · Last modified: 2017/06/25 05:06 by 0xabcdef