Jump to content
Sign in to follow this  
Apocca

Spawning bombs in the air

Recommended Posts

I need some sort of artillery, or basically just big controlled/triggered explosions in my mission. I remember in ArmA, a simple script that spawned a bomb in mid air that dropped down and exploded when the player entered the triggering area. That would be perfect, but unfortunately i lost all my missions for ArmA1 and can't look up the script :(

Anyone know how to do this? It was just a line of code in a trigger's activation field, where you could put in huge, big, medium and small types of bombs, depending on the explosion you wanted. And then ofcourse a script in the mission folder. Other methods are welcome too.

Bonus Question:

Unrelated to the thread, but another thing i never got a reply to:

When spawning a unit with the below code, how do you set the skill of the spawned unit?

Group1 = CreateGroup East; Group1 createUnit ["RU_Soldier_SL", [(getMarkerPos "Startingpoint") select 0,(getMarkerPos "Startingpoint") select 1,100], [], 0, "CAN_COLLIDE"];

Edited by Apocca

Share this post


Link to post
Share on other sites

I think you mean the Improvised Explosive Device Script (IED) from Jeevz. I don't know if this script works in ArmA2. Maybe change the bomb class names.

Here is a link

; 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

Edit: For skill

"RU_Soldier_SL" createUnit [ getMarkerPos "Startingpoint", group, init, skill, rank] ;

Edited by Imutep

Share this post


Link to post
Share on other sites

Ah yes, that is the one. Where can i look up the classnames for bombs/missiles and such? They ain't listed in the classnames thread as far as i can see.

Share this post


Link to post
Share on other sites

the bomb names in the original script seem to work fine in Arma 2 as far as I can tell. But same as you guys would be nice to have a full list as I'd like to tweak the explosion types a bit more.

Share this post


Link to post
Share on other sites

Medium dosn't work, and small dosn't seem very small at all anymore. Don't think large worked either.

Share this post


Link to post
Share on other sites

I fixed my post with the code. Posted the wrong version of the script. Sorry!

Share this post


Link to post
Share on other sites

I've tried this and it's great, downloaded the latest version off that German website link.

A question, is there a way to make the explosion delay, as it goes off immediately after mission starts? Thanks

Share this post


Link to post
Share on other sites

you need to place it in a trigger and set the conditions.

Share this post


Link to post
Share on other sites

Do I use the exact script line in the conditions box:

[theCar, "Small"] exec "IED.sqs"?

I tried it but it tells me "Type Nothing, expected Bool"

EDIT:

I have managed to set off the IED by setting the condition of the trigger 'true', and placing the above command on the activation box. However the bomb still goes off immediately after mission begins. How can I make it so the bomb only sets off once it passes through the trigger's radius?

Edited by nikodemus

Share this post


Link to post
Share on other sites

when you set true as the condition line of the trigger it is going to go off at the start of the mission. If you only want a certain vehicle to set it off then just group the trigger to the vehicle itself.

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  

×