Zombies don't attack Guards AIs (26.30)

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

AI

Summary

If I spawn both zombies and guards in the same area, after update 26.30 they won’t attack each other. Guard’s perceptions aren’t triggered by zombies at all.

Steps to Reproduce

  • Create a new map
  • Place both Creature and Guard spawns into it
  • Play

Expected Result

Guards attacking Creatures and Creatures attacking Guards

Observed Result

They ignore each other

Platform(s)

PC (UEFN test session)

It seems hiring, dismissing and hiring again “activates” the AI

2 Likes

@Klian thank you for reporting this issue and for the video you posted.
My team and I found a solution through Verse code.
This is definitely a bug, but we made a hack in code that works.
So we used the conditional button to call the guard when we need him during the game, and we implemented steps in code you described in video, but that did not worked, so we separated steps in two threads that work in parallel, and than it worked.
Example of code can be found bellow :

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Simulation/Tags }
using { /Fortnite.com/Characters }

random_device := class(creative_device):

@editable
Guards : guard_spawner_device = guard_spawner_device{}

@editable
GuardSpawnerButton : conditional_button_device = conditional_button_device{}

OnBegin<override>()<suspends>:void=
    GuardSpawnerButton.ActivatedEvent.Subscribe(ManageGuards)

ManageGuards(Agent : agent) :void=
    Guards.Enable()
    spawn:
        DismissAndHireAgain(Agent)

DismissAndHireAgain(Agent : agent) <suspends>: void=
    Sleep(0.1)
    Guards.Hire(Agent)
    Guards.DismissAgentHiredGuards(Agent)
    Guards.Hire(Agent)
    Guards.EliminatingEvent.Subscribe(GuardKills)

GuardKills(Res : device_ai_interaction_result) : void=
    Print("Guard killed something")
1 Like