Jump to content
Sign in to follow this  
DanBonehill

Remove NVG's of AI spawned using Site Module

Recommended Posts

Hi all,

I'm trying to create a mission where the enemy AI don't have NVG's. I know how to script this and put it in the units Init line however I am spawning these AI in using a site module.

I came across a code someone put on a different thread.

The code was:

{
       if (side _x == east) then {
               _x unassignItem "NVGoggles_Opfor";
               _x removeItem "NVGoggles_Opfor";
       };

} foreach allunits;

I have put this in the mission Init.sqf however it only works on players I have placed myself.

I assume this has something to do with the code been executed before the site module spawns in the AI?

Does anyone know a way to do this?

It may be that I have to place the AI myself, but that's a lot of work and a lot of mess in the editor (giving patrol routes ect)

Thanks.

Share this post


Link to post
Share on other sites

You could put the above in an sqf, call it via the init.sqf, but put a waituntil in there:

waituntil {time>3};//basically waits long enough for everthing on the map to intialize before exectuting, may need some tweaking.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×