Jump to content
Sign in to follow this  
sariel

No NVG in static weapon

Recommended Posts

Hi,

with this code i can remove nvgs from opfor units and force them to use flashlights:

this addPrimaryWeaponItem "acc_flashlight"; 
this unassignItem "NVGoggles_OPFOR"; 
this removeItem "NVGoggles_OPFOR"; 
this enablegunlights "forceOn";

but when i want to spawn a static unit (like a hmg/gmg) this unit has nvg.

is there an option to spawn a static unit without nvg? or can i spawn an infantry unit "in" an empty static weapon?

thanks for your help!

sariel

Share this post


Link to post
Share on other sites

Static weapons qualify as vehicles, so you could use the "crew" command.

Share this post


Link to post
Share on other sites

ok thanks guys - i managed it with a waypoint... but anyway thanks!

Share this post


Link to post
Share on other sites

Yea like the other guy said (this might come handy in future):

Bob moveinGunner thegun;

For vehicles too:

Bob moveinCargo car

Bob moveinDriver car

You put that in their init and they spawn in that slot.

Share this post


Link to post
Share on other sites
{
if ( _x isKindOf "CAManBase" && { ( side _x == east ) } ) then {
	_x addPrimaryWeaponItem "acc_flashlight"; 
	_x unassignItem "NVGoggles_OPFOR"; 
	_x removeItem "NVGoggles_OPFOR"; 
	_x enablegunlights "forceOn"; 
} else {
	if ( _x isKindOf "landVehicle" ) then {
		{
			if ( ( side _x ) == east ) then {
				_x addPrimaryWeaponItem "acc_flashlight"; 
				_x unassignItem "NVGoggles_OPFOR"; 
				_x removeItem "NVGoggles_OPFOR"; 
				_x enablegunlights "forceOn";
			};
		} forEach ( crew _x );
	};
};
} forEach allUnits + vehicles;

Edited by Iceman77

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  

×