SetActorAIState
Usage:
SetActorAIState(Actor, State)
Description:
The SetActorAIState command allows you to control the current AI mode of NPCs, and alter their behaviour. There are various possible states:
0 - Wait in current position, attack any valid targets who come into range
1 - Patrol - walk to destination, then set destination to new waypoint if available
2 - Run - same as Patrol but running instead of walking
3 - Chase and attack target
4 - For actors who are paused at a waypoint while on patrol
5 - Pet mode - actor will follow leader and attack leader's target (actor MUST have a leader to use this)
6 - Pet attack mode - actor is chasing and attacking the leader's target
7 - Pet wait mode - actor waits in current position and does absolutely nothing
Example:
Function Main()
// Make NPC attack player
SetActorTarget(ContextActor(), Actor())
SetActorAIState(ContextActor(), 3)
Return()
End Function
Comments (0)
You don't have permission to comment on this page.