Question How to make spawned AI seek cover?

Messages
12
Reaction score
2
Points
8
So I use a NPC spawner script I found on a youtube channel and I'm trying to get the AI I spawn to seek cover in the way that the pre-spawned AI do. Heres the code I tried

Please, Log in or Register to view URLs content!

no matter what I try, the AI do not seek cover. They run toward me and they hug me very annoyingly, sometimes blocking my way and getting me killed. Anyone have any pointers?
 

Killerfortress23

Known Member
Messages
4
Reaction score
0
Points
101
spawners[number].script_playerseek = true;//ai runs to player make it false and it should be as if it was a normal npc
 

P!X

Head Moderator
Staff member
Head Staff Team
Messages
408
Reaction score
583
Points
878
Unfortunately it didn't work. They just stand still.
change
spawners[number].script_playerseek = true;
to
spawners[number].script_playerseek = undefined;

the rest always depends on the map/mission
 
Messages
12
Reaction score
2
Points
8
change
spawners[number].script_playerseek = true;
to
spawners[number].script_playerseek = undefined;

the rest always depends on the map/mission
The odd thing is that if I spawn enemy characters and simply set them to ally, they do things such as seek cover and act like normal AI, even if I have playerseek set to true. It just doesn't do this for ally characters.

I took your advice anyway and set playerseek to undefined. Alas it did not work. They don't hide behind cover
 

P!X

Head Moderator
Staff member
Head Staff Team
Messages
408
Reaction score
583
Points
878
The odd thing is that if I spawn enemy characters and simply set them to ally, they do things such as seek cover and act like normal AI, even if I have playerseek set to true. It just doesn't do this for ally characters.

I took your advice anyway and set playerseek to undefined. Alas it did not work. They don't hide behind cover
ohh changing bot team is something i havent tested that much
but im pretty sure changing their behaviour is not that simple

maybe you find something usefull in the gsc files for the "No Russian" mission :smile:
 
Messages
12
Reaction score
2
Points
8
ohh changing bot team is something i havent tested that much
but im pretty sure changing their behaviour is not that simple

maybe you find something usefull in the gsc files for the "No Russian" mission :smile:
Thanks for your help thus far anyway. I will continue messing around
 
Top