modding:function:shpsetcontroller
This is an old revision of the document!
Discuss this page on this page's Talk ;Page
shpSetController
See shpSetController at Xelerus
Syntax | (shpSetController ship string) |
---|---|
Arguments | ship: The ship that want to change the ai on. |
string: The name of the controller. | |
Returns | condition: True if successful, Nil otherwise. |
Category | ai, ship |
Description | Changes the way that a ship behaves and carries out orders. |
\s+\“\s+'(([a-z]|[A-Z])+).+$
Supported Orders
Each controller supports a different set of orders in order to provide special behaviors.
Order / Controller | (standard) | auton | crew | ferian | fleet | fleetcommand | gaianprocessor | gladiator | zoanthrope |
---|---|---|---|---|---|---|---|---|---|
aim | ✓ | ||||||||
approach | ✓ | ✓ | |||||||
attack | ✓ | ✓ | ✓ | ✓ | |||||
attackArea | ✓ | ||||||||
attackHold | ✓ | ||||||||
attackNearestEnemy | ✓ | ✓ | |||||||
attackPlayerOnReturn | ✓ | ✓ | |||||||
attackStation | ✓ | ||||||||
bombard | ✓ | ||||||||
dock | ✓ | ✓ | |||||||
escort | ✓ | ✓ | ✓ | ✓ | |||||
fireEvent | ✓ | ||||||||
follow | ✓ | ||||||||
followPlayerThroughGate | ✓ | ✓ | ✓ | ✓ | |||||
gate | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
gateOnStationDestroyed | ✓ | ||||||||
gateOnThreat | ✓ | ||||||||
goto | ✓ | ||||||||
gotoPos | ✓ | ||||||||
guard | ✓ | ✓ | ✓ | ✓ | |||||
hold | ✓ | ||||||||
holdAndAttack | ✓ | ||||||||
holdCourse | ✓ | ||||||||
loot | ✓ | ||||||||
mine | ✓ | ✓ | |||||||
navPath | ✓ | ||||||||
orbit | ✓ | ||||||||
patrol | ✓ | ✓ | ✓ | ||||||
scavenge | ✓ | ||||||||
sendMessage | ✓ | ||||||||
sentry | ✓ | ||||||||
tradeRoute | ✓ | ||||||||
turnTo | ✓ | ||||||||
wait | ✓ | ✓ | |||||||
waitForEnemy | ✓ | ||||||||
waitForPlayer | ✓ | ✓ | ✓ | ||||||
waitForTarget | ✓ | ||||||||
waitForThreat | ✓ | ||||||||
waitForUndock | ✓ | ||||||||
wander | ✓ |
Example
(shpSetController gSource "auton")
Makes the calling ship act like an auton.
Return to Functions list
modding/function/shpsetcontroller.1498370078.txt.gz · Last modified: 2017/06/25 05:54 by 0xabcdef