Difference between revisions of "EnableAI - Actor"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jlundin
(New page: Category:Scripting Category:Papyrus '''Member of:''' Actor Script Enables or disables this actor's AI. == Syntax == <source lang="papyrus"> Function EnableAI(bool abEnable = ...)
 
imported>Bug64
m (Noted connection between AI and Havok)
Line 27: Line 27:
GoodActor.EnableAI()
GoodActor.EnableAI()
</source>
</source>
== Notes ==
* Disabling an actor's AI will also disable its havok processing.  As a result, moving an actor whose AI is disabled can result in the actor hovering in the air above the target destination.  When the AI is enabled, the actor will settle/fall to the ground.


== See Also ==
== See Also ==
*[[Actor Script]]
*[[Actor Script]]

Revision as of 19:03, 4 July 2015

Member of: Actor Script

Enables or disables this actor's AI.

Syntax

Function EnableAI(bool abEnable = true) native

Parameters

  • abEnable: Whether to enable or disable the AI.
    • Default: True

Return Value

None.

Examples

; Turn off evil AI
EvilActor.EnableAI(false)


; Turn on good guy's AI
GoodActor.EnableAI()

Notes

  • Disabling an actor's AI will also disable its havok processing. As a result, moving an actor whose AI is disabled can result in the actor hovering in the air above the target destination. When the AI is enabled, the actor will settle/fall to the ground.

See Also