Jump to content
Sign in to follow this  
BLQQD

Help fixing IED script

Recommended Posts

I downloaded this script (Would put spoiler to hide but idk how)

; Improvised Explosive Device Script

; By Jeevz

; v1.2 12/13/06

; This script will create an explosion of a

; selected size on any object when called

; The arguments are [objectName, explosionPower]

; Explosion Power will be 1 of 4 choices

; Small - Good for Anti-Personnel use

; Medium - Will usually disable a Humvee without killing the occupants

; Large - Will usually destroy a passing humvee and kill or severly injure all occupants, will disable the tracks and possibly engine on M1A1

; Huge - Nothing will survive, I mean... it's HUGE :-)

; Example script call --> [theCar, "Small"] exec "IED.sqs"

;start script

_theObject = _this select 0

_theExplosion = _this select 1

;locate the Object to be blown up

_bombLoc = GetPos _theObject

_bombLocX = _bombLoc select 0

_bombLocY = _bombLoc select 1

_bombLocZ = _bombLoc select 2

; Deterimine the ordinance used to create the explosion

? (_theExplosion == "Small") : _ammoType = "R_57mm_HE"

? (_theExplosion == "Medium") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Large") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB"

civvy1 globalchat _ammoType

; Get the explosion size and blow the object up

? (_theExplosion == "Small") : goto "SMALL"

? (_theExplosion == "Medium") : goto "MEDIUM"

? (_theExplosion == "Large") : goto "LARGE"

? (_theExplosion == "Huge") : goto "HUGE"

#SMALL

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Small"

exit

#MEDIUM

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Medium"

exit

#LARGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Large"

exit

#HUGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

_theObject setdammage 1

civvy1 globalchat "Huge"

exit

I figured out how to make it work but I have a problem with the medium and large settings. Occasionally instead of blowing up at the objects position, it fires a rocket out the side of the object.

Ideas anyone?

Share this post


Link to post
Share on other sites

Old post but I saw it and thought I'd reply..

; Deterimine the ordinance used to create the explosion

? (_theExplosion == "Small") : _ammoType = "R_57mm_HE"

? (_theExplosion == "Medium") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Large") : _ammoType = "M_Sidewinder_AA"

? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB"

I would use shells or bombs vs missiles. The sidewinders are probably launching instead of exploding. I've seen this before.

Change to:

; Deterimine the ordinance used to create the explosion

? (_theExplosion == "Small") : _ammoType = "R_57mm_HE"

? (_theExplosion == "Medium") : _ammoType = "Sh_85_HE"

? (_theExplosion == "Large") : _ammoType = "Sh_122_HE"

? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB"

Also, Why are there 12 createvehicles under large? you should only need 1.

---------- Post added at 02:29 AM ---------- Previous post was at 12:46 AM ----------

I like this script by Jeevz but I saw some ways to make it better, at least for my needs. I used more reliable ammo types and added the ability to delete the IED object to simulate it being blown to tiny bits in the explosion. I also disabled the global chat function as it is not desired outside of testing. I also commented out the setDamage 1 command as I don't see a need for it since the explosion will fully damage most vehicles that would be used as an IED.

Try this...

; Improvised Explosive Device Script

; By Jeevz, modified by Deathcon5 (Thanks Jeevz!)

; v1.2.1 3/25/14

; This script will create an explosion of a

; selected size on any object when called

; The arguments are [objectName, explosionPower, DeleteObject?]

; Explosion Power will be 1 of 4 choices

; Small - Good for Anti-Personnel use and will disable light vehicles

; Medium - Will usually disable a Humvee and may kill the occupants

; Large - Will usually destroy a passing humvee and kill or severly injure all occupants, might disable the tracks and possibly engine on M1A1

; Huge - Nothing will survive, I mean... it's HUGE :-)

; For best appearance I suggest deleting objects with ("Yes") that would be

; destroyed in the blast such as a suicide bomber or a car with a "Large" or "Huge" size explosion

; Example script call --> [theCar, "Large", "Yes"] exec "IED.sqs"

; start script

_theObject = _this select 0

_theExplosion = _this select 1

_deleteOrNot = _this select 2

;locate the Object to be blown up

_bombLoc = GetPos _theObject

_bombLocX = _bombLoc select 0

_bombLocY = _bombLoc select 1

_bombLocZ = _bombLoc select 2

; Deterimine the ordinance used to create the explosion

? (_theExplosion == "Small") : _ammoType = "R_57mm_HE"

? (_theExplosion == "Medium") : _ammoType = "Sh_85_HE"

? (_theExplosion == "Large") : _ammoType = "Sh_122_HE"

? (_theExplosion == "Huge") : _ammoType = "Bo_GBU12_LGB"

;civvy1 globalchat _ammoType

; Get the explosion size and blow the object up

? (_theExplosion == "Small") : goto "SMALL"

? (_theExplosion == "Medium") : goto "MEDIUM"

? (_theExplosion == "Large") : goto "LARGE"

? (_theExplosion == "Huge") : goto "HUGE"

#SMALL

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

;_theObject setdammage 1

if (_deleteOrNot == "Yes") then {deleteVehicle _theObject}

;civvy1 globalchat "Small"

exit

#MEDIUM

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

;_theObject setdammage 1

if (_deleteOrNot == "Yes") then {deleteVehicle _theObject}

;civvy1 globalchat "Medium"

exit

#LARGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

;_theObject setdammage 1

if (_deleteOrNot == "Yes") then {deleteVehicle _theObject}

;civvy1 globalchat "Large"

exit

#HUGE

_ammoType createVehicle[_bombLocX, _bombLocY, _bombLocZ]

;_theObject setdammage 1

if (_deleteOrNot == "Yes") then {deleteVehicle _theObject}

;civvy1 globalchat "Huge"

exit

Edited by Deathcon5

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  

×