Difference between revisions of "EnableAI - Actor"
Jump to navigation
Jump to search
imported>Bug64 m (Noted connection between AI and Havok) |
imported>Monsto m (added IsAIEnabled - Actor to →See Also) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 30: | Line 30: | ||
== Notes == | == 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. | * 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. | ||
* If an actor is moved while its AI is disabled, the actor's collision will move, but its visible character model will remain in the old position. Once AI is enabled, the character model will move to the proper location, though the actor (both collision and model) may also try to snap to the navmesh. | |||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] | ||
*[[IsAIEnabled - Actor]] |
Latest revision as of 23:13, 6 July 2019
Member of: Actor Script
Enables or disables this actor's AI.
Syntax[edit | edit source]
Function EnableAI(bool abEnable = true) native
Parameters[edit | edit source]
- abEnable: Whether to enable or disable the AI.
- Default: True
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Turn off evil AI
EvilActor.EnableAI(false)
; Turn on good guy's AI
GoodActor.EnableAI()
Notes[edit | edit source]
- 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.
- If an actor is moved while its AI is disabled, the actor's collision will move, but its visible character model will remain in the old position. Once AI is enabled, the character model will move to the proper location, though the actor (both collision and model) may also try to snap to the navmesh.