I watched a tutorial where the guard only used MaintainFocus
, and it would look at the player and shoot. But in my case, the guard only looks at me but does not shoot.
Simple Code:
GuardSpawner.AlertedEvent.Subscribe(OnAlerted)
OnAlerted(Result:device_ai_interaction_result):void=
if:
Guard:=Result.Source?
Target:=Result.Target?
Character:=Guard.GetFortCharacter[]
Focus:=Character.GetFocusInterface[]
then:
spawn{Focus.MaintainFocus(Target)}