NPC players cannot be added to ignore list of barrier device

Summary

Custom NPC players do not work properly with barrier device. Barrier will always block them.

Barrier will not observe ignored player list, ignored team list, or ignored class list in regards to custom NPCs.

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Spawn custom NPC
  2. Add custom NPC to barrier ignore list
  3. Observe custom NPC can not pass through barrier

CODE:

@editable NPCSpawner : npc_spawner_device = npc_spawner_device{}
...
NPCSpawner.Spawn()

AND THEN…

@editable BarrierNextArea : barrier_device = barrier_device {}

OnUnlock(PlayerAgent : agent):void=
{
    MaybeCustomPlayer := GameManager.CustomPlayerManager.GetCustomPlayer(PlayerAgent)
    if (CP := MaybeCustomPlayer?)
    {
        # allow the player through the barrier
        BarrierNextArea.AddToIgnoreList(PlayerAgent)

        # add companion to ignore list
        if( GameManager.CompanionManager.CompanionRegistry.HasCompanion(PlayerAgent) = true )
        {
            if (CompanionAgent := GameManager.CompanionManager.CompanionRegistry.GetNPCAgentFromPlayerAgent(PlayerAgent)?)
            {
                # BUG: BARRIER REFUSES TO PROPERLY ACKNOWLEDGE NPC PLAYER
                # Doesn't matter if it is added to the ignore player list, ignore team list, or ignore class list ... same result
                BarrierNextArea.AddToIgnoreList(CompanionAgent)
            }
        }
    }
}

Expected Result

Barrier device should properly observe ignored list. If a custom NPC player is added to the ignored player list then it should be treated just like any other player added to the ignore list.

Observed Result

When a normal player is added to the barrier device ignore list, it can pass through barrier.

When a custom NPC player is added to the barrier device ignore list, it can NOT pass through the barrier.

Platform(s)

UEFN Verse

Bumping this for visibility, as the issue is still present. Happens for both Custom & Guard options in a custom npc character definition.

1 Like

Bumping this again, it still doesn’t work

This is easily reproduceable and has been an issue for a while. There might even already be a bug report for this somewhere.

1 Like

The team is looking for ways to make this a better process and asked me to pass this along:
“The limitation is with the navmesh. We can only turn on/off navmesh generation for the barrier. We can’t selectively do that per NPC/Team/Class.”

3 Likes

FORT-840858 has been added to our ‘To Do’ list. Someone’s been assigned this task.

2 Likes

Ran into this today myself for an hour trying first via verse

Barrier.AddToIgnoreList(NpcAgent)

That didn’t work, no error, no failure, just won’t work which is the most frustrating part (not having any feedback). Tried also in editor selecting the npc_spawner_device and selecting on Spawned Event add to Barrier Device Ignore list, does not work either. Hopefully there will be a resolution in the future, for now I guess a button or other method to disable and then reenable barrier…