How can I make an invisible barrier through which I can pass but the NPC cant/wont see me through?

Greetings, I have a spawn area for my map in which players can stock up on weapons and get quests but I do not want the NPCs (which are the enemies) to come in the spawn zone or see the player at all.
So far I have a mutator zone device that helps with making the player invincible and whoever is inside the zone cannot shoot their guns, but NPCs can still follow in or shoot from the outside (it will not damage the player though).

How can I make it so they don’t follow in and ignore the player once the player is inside?

Thank you!

Hello Doom, Welcome to the Forums.

My first thought is to add a ‘Damage Volume’ device to kill the guards if they follow you to your spawn area. (Settings on the device to only damage ‘Team Index’ or booleans to only affect guards.)

Although I wonder if that would create a situation where players would just kite the guards…

A better thought: Have you tried placing an ‘AI Navigation Modification Device’?

Hello, sorry for the late reply. I have added these things and still have an issue with them shooting from outside the spawn area inside (while it does not damage the player), sometimes they also come in even with the ai navigation device set to blocked in that area. What else can I use to maybe stop them from seeing the player inside? Thank you!

No worries.

When you say you’ve added ‘these things’ does that mean you have a damage volume set to kill guards setup?

Hi,

Yea I have added the damage volume but they still shoot inside and camp the player outside. When the player leaves the spawn area and becomes vulnerable to damage, the NPCs will start shooting with pretty good accuracy so it is very difficult to escape once you’ve brought guards after yourself (if you kill a couple, more will come from other parts of the map). I want to make an invisible wall in which the player passes but the guards cannot see the player through in the spawn area. This would give time for the player to escape spawn and find a position to fight from. Is this possible? Thanks!

Are the guards standing inside the damage volume while shooting at you? I’d imagine they would instantly die when entering the volume.

What you’re asking for is simple, but I’m not aware of any way to define what a guard can and can’t see through. (This would involve communication with the AI perception system?) A situation where the guards are actively pursing the player might be different than when they are just patrolling.

There is a ‘Despawn’ hook on the Guard Spawner device. Would triggering a despawn of the guards work in your situation?

Also since you mentioned just wanting to give the player time to get a good spot to fight from, another idea is a ‘Health Powerup’ device that boosts HP on exit. - Or there is also a ‘Spawn Immunity’ setting in Island settings that could be used (but only happens when respawning).

No, they are outside the zone, actively trying not getting into it. When they do get in they die instantly, but they are trying to hide after buildings and shoot, go back into cover, etc. They are very annoying and they have very good aim once the player comes out of the zone so its a bit more difficult.

Was just asking if there is a way to make an invisible wall for guards that only players can go through and see, so that the guard will ignore the players until they exit spawn. Thanks!