Jump to content
Sign in to follow this  
VyMajoris

Creating IEDs on Editor and disarming them by Action menu

Recommended Posts

So, I know that there is lots of IEDs Threads, but none of them helped me at all.

What I need is know how to create a IED on editor and let only a certain unit disarm it. Like the "Engineer - Explosives" (ACE2).

Other units can disable it by detonating a C4 on it and by the action menu, but if they try by the action menu the IED may explode.

The IED should normally explode when a car pass close to it.

Thats all...

Thanks

Share this post


Link to post
Share on other sites

I've been wondering the exact same thing. All the different threads seem to give every option but one this simple.

Share this post


Link to post
Share on other sites

the only thing i found:

IEDtrigger = createTrigger["EmptyDetector", position _ai];

IEDtrigger setTriggerActivation [format["%1",_tgtSide], "PRESENT", false];

IEDtrigger setTriggerArea [5, 5, 45, false];

IEDtrigger setTriggerTimeout [2, 3, 4, false ];

IEDtrigger setTriggerStatements ["this",format["%1 action [""TOUCHOFF"",%1]",_ai],""];

And disarm it with the action menu but you are timed :)

Edited by DarkEclip

Share this post


Link to post
Share on other sites

i was looking for the same thing some time ago , couldnt find what i needed so ive made it myself (im a noob so it is bit rough but it does the trick) :

first create a trigger name it trig1 , in the condition list put :

hm1 in thislist; 

(hm1 is the name of your vehicle that will activate the ied) in on act. field put :

bomb="M_Sidewinder_AA" createVehicle [(getPos IED select 0),(getPos IED select 1),0];deleteVehicle IED;

now create an object that will act as ied (eg rubbish pile) and name it IED

this will create an ied that will explode when vehicle "hm1" drive in the trigger area.

now create another trigger (no radius needed) and in Condition put :

!alive IED;

in on act. put :

deletevehicle trig1;

now you can detonate the ied by destroing the object (here rubbish pile) with for example satchel charge.

the last thing is disarming by proper unit (here engineer) :

create file disarm.sqf in it put :

class = typeOf player;

if(class == "US_Soldier_Engineer_EP1") then{player playmove "AinvPknlMstpSlayWrflDnon_medic"; sleep 12;
deletevehicle trig1; hint "IED Disabled";
}else{player playmove "AinvPknlMstpSlayWrflDnon_medi"; sleep 9;
bomb="M_Sidewinder_AA" createVehicle [(getPos IED select 0),(getPos IED select 1),0];deleteVehicle trig1;
};

that will allow to disarm the ied by engineer , anyone else try to disarm it will die in blast.

activate the script by putting this in init line of your IED object (rubbish pile) :

dsrm = this addaction ["try to disarm IED","disarm.sqf"];

its late so even though i've done my best there can be an error somewhere , if you encounter a problem let me know i'll try to help.

Share this post


Link to post
Share on other sites

Be careful using M_ type ammo as an IED since the player will be able to see the missile streaking in the moment it's created. :)

Share this post


Link to post
Share on other sites

oh , didnt know that :) the rubbish pile i've used was quite big so the missile was probably concealed within ;)

Share this post


Link to post
Share on other sites

Heya!

Braincrush, I rewrote the script a little bit, hope that's okey for you.

At least when using the ACE-Mod, you can attach tripwires to IED-objects by using the following command:

this setVariable ["direction", [b](Direction as a number, e.g. 180)[/b]]; this setVariable ["length", [b](Lenght of the tripwire as a number, e.g. 5)[/b]];

So it could look like this:

this setVariable ["direction", 180]; this setVariable ["length",7];

This would create a tripwire, facing at 180 degrees with a length of 7 meters.

Now, when using the original script you'd have to have specific names for every IED plus an extra disarm script, since the script includes

specific names.

Here is the new one:

class = typeOf player;
_EXPLO = _this select 0;

if(class == "US_Soldier_Engineer_EP1") then {player playmove "AinvPknlMstpSlayWrflDnon_medic"; 
sleep 9;
deletevehicle _EXPLO;
}else{player playmove "AinvPknlMstpSlayWrflDnon_medic"; sleep 8;
bomb="Bo_GBU12_LGB" createVehicle [(getPos _EXPLO select 0),(getPos _EXPLO select 1),0];
};

All you have to do is to put the following code, just as in the original script, in the init line of the IED:

dsrm = this addaction ["Try to disarm the IED","disarm.sqf"];

That's basically it, here is a small demo-mission.

If you want the IED to be activated via a trigger, just do it as in the original.

Hope that was helpful,

Leo

Share this post


Link to post
Share on other sites

I was playing around with the IED idea in the editor a long time ago, Just recently found my old test mission so you are welcome to take it and expand on it. Have not tested multilayer but I think you will have fun with it :)

http://www.2shared.com/file/j3AMw_q1/IED_TESTDesert_E.html

---------- Post added at 01:30 PM ---------- Previous post was at 01:25 PM ----------

quick explanation - the bomb is somewhere on the vehicles you have to search and find it. Only a specific class unit can enter the detection zone and only 1 of that type of unit, Find the bomb and disarm it :)

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  

×