Difference between revisions of "Add-goal"
From FreeSpace Wiki
(→Comments) |
(additional comment + minors) |
||
Line 10: | Line 10: | ||
===Comments=== | ===Comments=== | ||
− | Used to give new orders to AI ships. Add-goal adds a priority 89 goal by default, which will take priority over whatever else the AI is doing; it's usually unnecessary to call the [[clear-goals]] SEXP first. Note also that fighters and bombers may ignore their assigned orders to defend themselves, unless you deactivate dynamic goals for these ships (an option available in the | + | Used to give new orders to AI ships. Add-goal adds a priority 89 goal by default, which will take priority over whatever else the AI is doing; it's usually unnecessary to call the [[clear-goals]] SEXP first. Note also that fighters and bombers may ignore their assigned orders to defend themselves, unless you deactivate dynamic goals for these ships (an option available in the Wing Editor and the Miscellaneous section of the Ship Editor). |
You can use an add-goal SEXP right on startup for orders that return an error in the Initial Orders window. | You can use an add-goal SEXP right on startup for orders that return an error in the Initial Orders window. | ||
+ | |||
+ | If you issue an add-goal to a ship that's in the process of undocking, the AI gets confused, resulting in weird behavior. | ||
[[Category:Retail SEXPs]] | [[Category:Retail SEXPs]] |
Latest revision as of 12:14, 8 March 2021
add-goal Add goal (Action operator) Adds a goal to a ship or wing. Takes 2 arguments... 1: Name of ship or wing to add goal to. 2: Goal to add.
Comments
Used to give new orders to AI ships. Add-goal adds a priority 89 goal by default, which will take priority over whatever else the AI is doing; it's usually unnecessary to call the clear-goals SEXP first. Note also that fighters and bombers may ignore their assigned orders to defend themselves, unless you deactivate dynamic goals for these ships (an option available in the Wing Editor and the Miscellaneous section of the Ship Editor).
You can use an add-goal SEXP right on startup for orders that return an error in the Initial Orders window.
If you issue an add-goal to a ship that's in the process of undocking, the AI gets confused, resulting in weird behavior.