Forum Jump :

Author Message


Posts:
Rank:


Level:

Country: 00
Location:
Occupation:
Age: 17
In-game name:

 
#1 Posted at 2013-06-08 23:33        
     
I made a simple IED disarm script for a patrol mission. It works quite nice if you only want Engineers to be able to disarm IED's.

On the init of your IED put this (You may need to edit the engineer and bomb class names):
this addAction ["Disarm","disarm.sqf"];

In disarm.sqf put the following code:
_ied = _this select 0;
_unit = _this select 1;
_class = typeOf _unit;

if (_class == "ACE_USMC_SoldierS_Engineer_D" || _class == "USMC_SoldierS_Engineer") then {
	_unit playmove "AinvPknlMstpSlayWrflDnon_medic"; 
	sleep 8;
	deleteVehicle _ied; 
	hint "IED Disarmed";
} else { 
	_unit playmove "AinvPknlMstpSlayWrflDnon_medic"; 
	sleep 4;
	bomb="ACE_Bo_Mk82" createVehicle (getPos _ied);
	deleteVehicle _ied;
	hint "IED Detonated";
};

A nice little bonus is having the IED detonate if a BLUFOR driven vehicles drives too close to it. For this, simply name your IED something like: IED1

Then make a trigger with these statements:

Activation: BLUFOR | ONCE | PRESENT
Axis A/B: 30 (meters)
Name: IED_Trig_1
Condition: {_x iskindof "LandVehicle"} count thislist > 0;
On Act: _bomb = 'ACE_Bo_Mk82' createVehicle (getPos IED1); deleteVehicle IED_Trig_1; deleteVehicle IED1;

I've included a mission file using this script, you can download it here