My Guard Type custom NPC’s have stopped shooting at the player. I have checked everything from team, to active hostility, given them weapons, ammo etc. Nothing seems to be working. It was working fine before the update, now it is broken.
I have also just created standard NPC behaviours, and set behaviour to default, and still nothing is happening.
Is there a new way in verse to control custom NPC aggression that I have missed?
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
AI
Steps to Reproduce
Create NPC Spawner, set Type to Guard, Create Custom Verse Behaviour and associate, Place in editor, Play
Expected Result
Guard NPC’s should be firing on the player.
Observed Result
They are showing as hostile and alert, they are following the custom behaviour otherwise, focus, navigation etc. They just aren’t attacking as they were before the update.
I have code setup for guards to force attack and they pretty much ignore players until the players attack them. So force attack is not working anymore since 34.00
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)
Since you are controlling focus, the “default behavior” will not be active, you would need to use the perception interface and call Attack on the detected target
(Note that all of this is still experimental)