Having the same issue with guards from the Guard Spawner device. Adding this here in case the problem is with the underlying Guard type (I assume both devices use).
The guard maintains focus with the player but doesn’t shoot.
Guard Spawner settings:
- has weapons & ammo
- different team
Code I’m using:
using { /Fortnite.com/AI }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
guard_ai_device := class(creative_device):
@editable
GuardSpawner : guard_spawner_device = guard_spawner_device{}
OnBegin<override>()<suspends>:void=
GuardSpawner.AlertedEvent.Subscribe(OnAlerted)
# Signaled when a guard has identified an opponent.
# `Source` is the guard who is aware.
# `Target` is the agent who alerted the guard.
OnAlerted(Result: device_ai_interaction_result):void=
if:
GuardAgent := Result.Source?
TargetAgent := Result.Target?
GuardFC := GuardAgent.GetFortCharacter[]
GuardFI := GuardFC.GetFocusInterface[]
then:
spawn:
GuardFI.MaintainFocus(TargetAgent)