Jump to content
Sign in to follow this  
-=FW=-Platty

Car/Truck Bombs & Suicide Bombers

Recommended Posts

I would like to make moving and parked vehicles explode as if setting off a terrorist bomb carried in them. I've tried a 'SetDamage' command on the units but there's no explosion, they just start burning, which doesn't do any damage to the area around.

Can someone guide me through how to do this, or point me at some scripts that will do this? So far my searches haven't turned anything up.

Share this post


Link to post
Share on other sites
I would like to make moving and parked vehicles explode as if setting off a terrorist bomb carried in them. I've tried a 'SetDamage' command on the units but there's no explosion, they just start burning, which doesn't do any damage to the area around.

Can someone guide me through how to do this, or point me at some scripts that will do this? So far my searches haven't turned anything up.

Ey up Platty biggrin_o.gif (My fist two letters in my username reveals my identity wink_o.gif)

I have an IED script from here somewhere that you can make any object an IED, basically a trigger with an explosion attached to it. I had some limited success with it but it acted a little odd sometimes.

I expect what you're after is a satchel-charge like effect like we used in OFP occasionally? If so you'd have to wait for some kind soul to script in satchel charge attachment to objects.

Share this post


Link to post
Share on other sites
Guest

I have made an IED script still in beta (its working just one feature I want in it doesnt work yet).

It can only be used for static objects so no driving cars etc.

Read the page and the included readme for details.

http://www.armaholic.com/page.php?id=1180

Share this post


Link to post
Share on other sites

Try something like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">ied = "G_40mm_HE" createVehicle [getPos car select 0, getPos car select 1, 1]

Where car is the name of the vehicle you want to make explode. G_40m_HE has limited explosion power to setoff a car, try something more heavy. Have a look in Biki - CfgWeapons (Vehicle Weapons) to find out the ammo class names you can use.

You can use the above code in the on activation field of a trigger that is positioned directly on the vehicle and has a radius of let's say 20, activation West/East/Resistance (whatever you need), present. Then the IED will set off as soon as a West/East/Resistance unit is inside the trigger.

Share this post


Link to post
Share on other sites

This has been covered several times recently. You do it the same way you do a static IED. Do a search for "IED".

Share this post


Link to post
Share on other sites
This has been covered several times recently. You do it the same way you do a static IED. Do a search for "IED".

To be fair the topic is for moving and static vehicles, not just IED type behavior.

Share this post


Link to post
Share on other sites
This has been covered several times recently. You do it the same way you do a static IED. Do a search for "IED".

To be fair the topic is for moving and static vehicles, not just IED type behavior.

Im trying to make a moving IED script...

Its a pipebomb that is created and should setpos to a car every 0.1 seconds or so, i also have a trigger that activates when 0-0-1 but nothing happens, the bomb should explode (setdamage 1) but it doesnt work... Im not sure where it fails, but im gonna find out!

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;moving IED, or carbomb, whatever

;Usage: [car,pipebomb] exec "ied.sqs"

; object to hold the ied

_holder = _this select 0

; type is class of weapon/bomb, e.g pipebomb

_IEDtype = _this select 1

_height = 10

_pos = getpos _holder

_pos = [(_pos select 0),(_pos select 1),_height]

;creating the bomb

_IED = _IEDtype createvehicle _pos

IEDTRIGGER=0

_height = 2

#loop

;check trigger.

?(IEDTRIGGER==1): goto "bomb"

;update pos

_pos = [(_pos select 0),(_pos select 1),_height]

_IED setpos _pos

~0.1

goto "loop"

#bomb

_IED setdamage 1

exit

Maybe im too tired, or my memory is too forgotten :P

It shouldnt be that hard to make a moving bomb script, really.

Share this post


Link to post
Share on other sites
Quote[/b] ]#loop

;check trigger.

?(IEDTRIGGER==1): goto "bomb"

;update pos

_pos = [(_pos select 0),(_pos select 1),_height]

_IED setpos _pos

~0.1

goto "loop"

#bomb

_IED setdamage 1

exit

Well i am no script pro but maybe the script never reaches further than goto "loop" because it goes back loop again. you could try deleting #bomb

_IED setdamage 1 part and instead launching it in another script so you would have 2 scripts:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">;moving IED, or carbomb, whatever

;Usage: [car,pipebomb] exec "ied.sqs"

; object to hold the ied

_holder = _this select 0

; type is class of weapon/bomb, e.g pipebomb

_IEDtype = _this select 1

_height = 10

_pos = getpos _holder

_pos = [(_pos select 0),(_pos select 1),_height]

;creating the bomb

_IED = _IEDtype createvehicle _pos

IEDTRIGGER=0

_height = 2

#loop

;check trigger.

?(IEDTRIGGER==1):

;update pos

_pos = [(_pos select 0),(_pos select 1),_height]

_IED setpos _pos

~0.1

goto "loop"

exit

Launch this from a trigger or waypoint so it is active all the time then make another script blowing the IED

I will try making something tommorow as it is late right now...

Share this post


Link to post
Share on other sites

This is exactly the same as an IED. Moving or static it doesn't require anything more than creating the "bomb" and using the setpos command.

You guyz are way over complicating this.

I mean no offense at all but this is why I made the post about triggers a week or so ago. When you get cought up in scripting this is always what happens. I do the same thing sometimes.

Share this post


Link to post
Share on other sites

Thanks for the reply, well, the loop is to keep the IED in the car.

However, i fail with the script, it has changed somewhat since i last posted here so the new one will check the trigger, and activate when trigger is activated, so the bomb will be created on the car and explode instantly, Im using a sabot for this, it gives a nice explosion and it is what i use for my artillery script smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

;IED

;usage: [vehicle,bombtype,] exec "iedExplode.sqs"

_holder = _this select 0

_bombtype = _this select 1

_dir = getdir _holder; this isnt required yet

_IED = _bombtype createVehicle [(position _holder select 0),(position _holder select 1),(position _holder select 2)]

_IED setda

exit

But this works bad on moving vehicles, to fix this we need to

get the future x/y point so the shell will spawn in the middle of

the vehicle, Im gonna try and do it later on, but feel free to do it yourself :P

carbomb script can be downloaded at ofpec.com, but its example mission is on desert island in OFP. Not sure if it works.

Share this post


Link to post
Share on other sites
This is exactly the same as an IED. Moving or static it doesn't require anything more than creating the "bomb" and using the setpos command.

You guyz are way over complicating this.

I mean no offense at all but this is why I made the post about triggers a week or so ago. When you get cought up in scripting this is always what happens. I do the same thing sometimes.

Well, tbh i like this, even if it has already been done and it can be downloaded from OFPEC. For me, this is fun and it adds to my own

experience and I dont wanna have to use other peoples scripts,

except perhaps some parts of them. Besides, its fun to test as

well, I have a huge project im working on and i need to freshen up and renew my scripting knowledge:)

Share this post


Link to post
Share on other sites

I'd only use a pipeBomb if you need the kills to get registered to the bomb user. Otherwise just createVehicle a suitable shell or bomb in or underground beneath the car when you want it to explode. I haven't tested creating shells underground in ArmA, but it was useful in OFP to "tune" the damage radius, since there is a huge gap between the LGB and the next smallest munition.

Share this post


Link to post
Share on other sites

Well i just managed to make a script that works on moving stuff:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">; On act: [type of bomb, name of object to destroy] exec "explosion.sqs";

;Works best with: "R_Hydra_HE", "Bo_GBU12_LGB".

_type = _this select 0;

_object = _this select 1;

_type createvehicle (getPos _object);

exit;

Then just add F.I a car called car1. then make a radio trigger or present... and in the activation i type:

["Bo_GBU12_LGB", car1] exec "explosion.sqs"

and voila:)...

Now i only want to creat so that if a car goes over/ under a certain speed he will blow up...

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  

×