@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)
}
}
}
}
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.
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.”
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…
This is still broken? Any update on how to get around this? The only way I can think of is just spawning the npc again once getting through the barrier