Remove NV/IR(thermal) equipment on assembled UAV's

Party-approved future science plus handbooks for the revolution
Post Reply
User avatar
head
Posts: 133
Joined: Sun Jul 31, 2011 4:22 pm
Location: Sweeeden

Remove NV/IR(thermal) equipment on assembled UAV's

Post by head »

Code: Select all

player addEventHandler ["WeaponAssembled",{
_unit = _this select 0;
_wep = _this select 1;
_type = typeName _wep;
// check if a object (might not be necessary now that it think about it, but whatever.)
if(_type == "OBJECT") then
{
	// Check if a UAV
	if(_wep IsKindOf "UAV_01_base_F") then
	{
		_wep disableTIEquipment true;
	};
};
}
];

Best place would be the init for this kind of thing.

Anyway will disable NV(not sure if a bug) and thermal imagining on the small uavs that comes in backpacks. (When assembled)

User avatar
head
Posts: 133
Joined: Sun Jul 31, 2011 4:22 pm
Location: Sweeeden

Re: Remove NV/IR(thermal) equipment on assembled UAV's

Post by head »

Example for init.sqfs


Limit to one side
Change BLUFOR to desired side
(BLUFOR,OPFOR,INDEPENDENT)

Code: Select all

if(side player == BLUFOR) then
{
player addEventHandler ["WeaponAssembled",{
_unit = _this select 0;
_wep = _this select 1;
_type = typeName _wep;
// check if a object (might not be necessary now that it think about it, but whatever.)
if(_type == "OBJECT") then
{
   // Check if a UAV
   if(_wep IsKindOf "UAV_01_base_F") then
   {
      _wep disableTIEquipment true;
   };
};}];
};


Post Reply