How to make a spawned AI not attack the one who spawned it?

Right now I have an AI that has a vision sense and attacks anything it sees.

I also have a key that spawns the AI next to the person who called for it. (Multiplayer)

Is it somehow possible to make the AI ignore the person who spawned it?

I have problem even determining who this person is, since he calls for a server to spawn it, so technically no player spawns it but the server does…

how are you calling the spawn event? i imagine it wouldnt take too much to pass along who the player was that initialted the call for spawn event. as for the not attacking part well thats pretty simple add in a check does current target = who spawned me if yes do nothing or find another target. without knowing your code and how your implementing things its hard to give exact answers. for example are you using behavior trees?

I spawn it like this https://i.imgur.com/aTWWoLN.png . Get camera from character bp and then tell the server to spawn it there

Oh maybe I will try to SetOwner to self after I spawn it… idk ill try to play with that

This works, thanks.

It worked.

When spawning the AI, you could set the instigator to the spawning player on the spawn actor node. Then, in your AI shooting logic, use a NOT statement to shoot anything that is not the AI’s instigator, AKA the spawning player.

1 Like

My pleasure!

Thank you. :')