Jump to content
Sign in to follow this  
bigshotking

Road Side IED

Recommended Posts

I have been wondering how to make a road side IED. I want to do it in a way where you can have a empty car parked on the side of the road, and when the BLUFOR gets close enough the car blows-up.

If anyone can help me in getting this to work it will be greatly appreciated!

-Bigshot :D

Share this post


Link to post
Share on other sites

easy way if you manually place the object where you want it would be:

Create a trigger with side of choise present and your range on top of the object (car), and in on activation place

_ied = "ARTY_Sh_105_HE" createVehicle (getPos objectname);

you can get other types of explosives here is 105mm arty HE rounds used.

http://community.bistudio.com/wiki/ArmA_2:_Weapons#Artillery_Weapons_and_Special_Ammo

Also recomend you do a quick search here on forums for ied and you will get alot of already finnished scripts, ranging from basic to extreme complex.

Share this post


Link to post
Share on other sites

Insert an object to be the ied and name it ied1

Trigger one:

Size 5x5

Once

CONDITION: this AND (alive ied1)

ON ACTIVATION: bomb = "R_57mm_HE" createvehicle GetPos ied1;ied1 setdamage 1;

Second trigger

No activation

siza 0x0

Once

CONDITION: !(alive ied1)

ON ACTIVATION: bomb = "R_57mm_HE" createvehicle GetPos ied1;ied1 setdamage 1;

Now, if they player gets close, the ied will go off.

If he spots it, and shoots it, it will go off and be deactivated.

Share this post


Link to post
Share on other sites

Here is a simple IED.

Name Object/vehicle ied1

Then place a trigger with

bomb = "Bo_GBU12_LGB" createVehicle getPos ied1;

in the OnAct

Set Activation to BLUFOR

Set your axis to suit the path of the BLUFOR vehicles and when they enter the field, BOOM!

You can change the explosion type of course, I just like my IED's to level blocks lol.

Share this post


Link to post
Share on other sites

Here's a simple script which automatically puts a car bomb by the side of the road somewhere near the player. Run it from your init.sqf as many times as you want. Eg run it 3 times, you'll get 3 bombs.

// Roadside carbomb 

scopename "mainscope";

_rdist = 5 + random 5 ; // how far from road is carbomb?
_pdist = 3000; // how far from player to spawn bomb?
_tdist = 10; //distance to trigger bomb 
_cars = ["lada1","skoda","skodablue","skodared","skodagreen","ladalm","car_hatchback","car_sedan","Lada1_TK_CIV_EP1","Lada2_TK_CIV_EP1","SUV_TK_CIV_EP1","S1203_TK_CIV_EP1","hilux1_civil_3_open_EP1"];
_cartype = _cars select (floor random (count _cars));
_list = player nearRoads _pdist; // which road segments within set radius of player
_road = _list select (random (count _list)); // pick a random road
_dir = getdir _road; // direction of road
_pos = getpos _road;  // where is it?
_posx = _pos select 0; 
_posy = _pos select 1;
_tx = (_posx + (_rdist * sin(_dir)));
_ty = (_posy + (_rdist * cos(_dir)));
_bombpos = [_tx,_ty,0]; // where to actually spawn car and bomb
_car = _cartype createvehicle _bombpos;

/*
//Place a marker on map - for debugging
bombmarker = createmarker ["bombmarker", _pos];
bombmarker setMarkerText "Carbomb";
bombmarker setMarkerType "Dot";
bombmarker setMarkerColor "ColorGreen";*/

// Create trigger
_trg=createTrigger["EmptyDetector",_bombpos];
_trg setTriggerArea[_tdist,_tdist,0,false];
_trg setTriggerActivation["WEST","PRESENT",true];
_trg setTriggerStatements ["this", format["bomb = 'Bo_GBU12_lgb' createvehicle %1",_pos], ""]; // will set LARGE bomb!

// Remove trigger if exploded or car destroyed
while {alive player} do
{
if ((damage _car > 0.1 ) or (triggeractivated _trg)) then {
deletevehicle _trg; 
group player  setbehaviour "COMBAT"; 
breakto "mainscope";
};
sleep 5};

Share this post


Link to post
Share on other sites
Here is a simple IED.

Name Object/vehicle ied1

Then place a trigger with

bomb = "Bo_GBU12_LGB" createVehicle getPos ied1;

in the OnAct

Set Activation to BLUFOR

Set your axis to suit the path of the BLUFOR vehicles and when they enter the field, BOOM!

You can change the explosion type of course, I just like my IED's to level blocks lol.

For some reason it keep creating the IED over and over and over again, the trigger is not set to repeat, any ideas?

Share this post


Link to post
Share on other sites

It's because 97% of people replying to this kind of topic always leaves out a crucial thing out.

Triggers are local to each machine. They will fire when the condition becomes true on that machine. CreateVehicle is a global command. Meaning, when it's run on a machine, it will be synced to everybody else.

So, now we have server + players amount of triggers which each will create a bomb and sync it to everyone else. That will get out of hand when there are a lot of players.

So the crucial thing that seems to be forgotten or not even known is to limit the creation to just server machine.

onAct:

if isserver then {"Bo_GBU12_LGB" createVehicle getPos ied1};

Share this post


Link to post
Share on other sites
Insert an object to be the ied and name it ied1

Trigger one:

Size 5x5

Once

CONDITION: this AND (alive ied1)

ON ACTIVATION: bomb = "R_57mm_HE" createvehicle GetPos ied1;ied1 setdamage 1;

Second trigger

No activation

siza 0x0

Once

CONDITION: !(alive ied1)

ON ACTIVATION: bomb = "R_57mm_HE" createvehicle GetPos ied1;ied1 setdamage 1;

Now, if they player gets close, the ied will go off.

If he spots it, and shoots it, it will go off and be deactivated.

Where would the explosive be on the vehicle? I dont see anything at all. There is nothing to shoot at.

---------- Post added at 09:16 PM ---------- Previous post was at 07:29 PM ----------

Do I have to put a physical IED down to make it work? Or is there something wrong with the code I was given, because there is nothing that you can shoot at to destroy the IED.

Edited by bigshotking

Share this post


Link to post
Share on other sites

I made the experience creating bomb shells directly at the position of the IED object gives me an explosion, but an explosion with no effect - it doesn't do any damage.

I always need to spawn the bomb shell a bit above ground for the explosion to actually have any effect.

Would like to know if its just me and I missed something there...

Edited by Bon

Share this post


Link to post
Share on other sites

No some bombs are just or mainly a graphical effect, some do seem to have quite limited damage.

What I usually do is just move a trigger to the area and destroy everything in that area.

on act

{{_x setdamage 1} forEach (crew _x);_x setdamage 1; } forEach thislist;

Share this post


Link to post
Share on other sites

So can anyone tell me what's wrong? I've tried everything in this thread so far, with no luck...

Share this post


Link to post
Share on other sites
I made the experience creating bomb shells directly at the position of the IED object gives me an explosion, but an explosion with no effect - it doesn't do any damage.

I always need to spawn the bomb shell a bit above ground for the explosion to actually have any effect.

Would like to know if its just me and I missed something there...

Ive experienced this in my own ied scripts,

I found that when you create the bomb on getPos whatever object you create it dead center on ground, meaning for most objects, on the inside of that object so all damage done is within object, i solved it like you did, placing explosives a little above object instead.

Now problem, if you look closely youll see my LGBU spawn just above the object and fall down and explode, not fine visually, i worked around it by spawning a smaller or same type explosive first dead center of object and after i spawn the one that is higher.

first explosion masks the second bomb spawn.

Alternative is to delete the ied object, fex the car and spawn the bomb, wich should deliver damage, but youll get no wreck burning, you could ofc add wreck after explosion..

Share this post


Link to post
Share on other sites

Hmm, is it possible to have a civilian run up to the road, place a bomb then move away? And have a vehicle move in a waypoint right afterwards?

Share this post


Link to post
Share on other sites

Or you can create a fake explosion and script the damage too how you see it fit the mission.

Share this post


Link to post
Share on other sites
Hmm, is it possible to have a civilian run up to the road, place a bomb then move away? And have a vehicle move in a waypoint right afterwards?

Yes to both.

Just have your man walk up to the target and then in the waypoint a safe distance away have it trigger the bomb, if you want a vehicle to move at that point just have a waypoint on the vehicle and use the sync line to waypoint that sets the bomb off.

Share this post


Link to post
Share on other sites

You can, instead of just creating a biga** bomb, create a simulated EFP [explosively formed penetrator] along with some high explosives. This only works if you set the bomb up to be a kind of mine, or road bomb that is actually buried in the road itself. The script here basically just assumes you have a position stored in _bombPos which will ideally be underneath the target vehicle. The details of that are up to you, but here is a method of making the bomb I've been having some success with:

   {sleep _x; 
   _EFP = "Sh_120_SABOT" createVehicle _bombPos; 
   _EFP setVelocity [velocity _EFP select 0, velocity _EFP select 1, 2000]; 
   "M_Stinger_AA" createVehicle _bombPos;} forEach _bombIntvls;

(of course there would also be an array _bombIntvls, in mine I have only a single number in there to determine how long to wait before detonating the bomb, in seconds.)

The SABOT round fires up at some ridiculous mach 5 speed (from my quick estimate, idk), so if it directly hits the target vehicle, the vehicle is instantly destroyed. If it is a near miss, the SABOT round ends up somewhere in orbit and is never heard from again, while the M_Stinger_AA takes care of disabling the wheels and/or turret of hum-vees, and killing any infantry in the area.

EDIT:

After the above code, you can add the following to put in armor piercing projectiles angled upward in a cone around the detonation position.

   _bvels = []; 
  _vel = 1250; 
  _countBullets = 32;
  _angles = [];
  _i = 0;
  _iIncVal = 360 / _countBullets;
  while {(_i < 360)} do {
     _angles = _angles + [_i];
     _i = _i + _iIncVal;};
  {_bvels = _bvels + [[(_vel * (cos _x)),(_vel * (sin _x)),(_vel * (sin (22.5 + (random 60))))]];} forEach _angles; 
  {_bulX = "B_145x115_AP" createVehicle _bombPos; _bulX setVelocity _x;} forEach _bvels;

That code actually created a bomb that, when detonated right in front of an uparmored hmmwv, took out the wheels and killed one of the passengers (in the back seat). The rest of the passengers disembarked. You may wish to edit the code, as I have not really tested it further. I was just happy to finally find something that could kill passengers without killing everyone inside. This is WITHOUT ACE, mind you :P

EDIT 2:

Here is a demonstration of what this bomb is like, with slight alterations. Here is the code (_timerBomb was set to about 3 seconds and you would need to do something like that in your own script if you used this):

   _bombIntvls = [_timerBomb];
  {sleep _x; 
   _EFP = "Sh_120_SABOT" createVehicle _bombPos; 
   _EFP setVelocity [velocity _EFP select 0, velocity _EFP select 1, 2000]; 
   "M_Stinger_AA" createVehicle _bombPos;} forEach _bombIntvls;
  _bvels = []; 
  _vel = 1250; 
  _countBullets = 80;
  _angles = [];
  _i = 0;
  _iIncVal = 360 / _countBullets;
  while {(_i < 360)} do {
     _angles = _angles + [_i];
     _i = _i + _iIncVal;};
  {_bvels = _bvels + [[(_vel * (cos _x)),(_vel * (sin _x)),(_vel * (sin (15 + (random 45))))]];} forEach _angles; 
  {_bulX = "B_145x115_AP" createVehicle _bombPos; _bulX setVelocity _x;} forEach _bvels;

Video:

(and I realize that the velocity is not properly calculated in 3 dimensions. This is just something that worked. :P)

Edited by dwringer

Share this post


Link to post
Share on other sites
No some bombs are just or mainly a graphical effect, some do seem to have quite limited damage.

What I usually do is just move a trigger to the area and destroy everything in that area.

on act

{{_x setdamage 1} forEach (crew _x);_x setdamage 1; } forEach thislist;

Would I place this line in my IED trigger? I'm having problems with figuring this out. I've had 500 lbs bombs be my IEDs, huge mushroom cloud when it detonates, takes out any buildings near it and sets the area on fire(JTD fire and smoke) but the only damage to the humvee is it's wheels are destroyed and the men inside dismount. And just stand there like nothing happened.

Share this post


Link to post
Share on other sites
Would I place this line in my IED trigger? I'm having problems with figuring this out. I've had 500 lbs bombs be my IEDs, huge mushroom cloud when it detonates, takes out any buildings near it and sets the area on fire(JTD fire and smoke) but the only damage to the humvee is it's wheels are destroyed and the men inside dismount. And just stand there like nothing happened.

Strange are you using latest patch??

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  

×