Home   Help Search Login Register  

Author Topic: Blowing stuff up!  (Read 997 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
Blowing stuff up!
« on: 09 Jul 2004, 14:05:55 »
Is there anyway, without using add-ons, to just make an explosion activate on any spot of choice at any time of choice through the mission editor?

If not, how do I kill something using 'setDamage' but also make an explosion occur, rather than the unit just turning into toast? (I'm using M113s)

After I get the explosions sorted, my intro will finally be complete.  :)

Thank you!

ponq

  • Guest
Re:Blowing stuff up!
« Reply #1 on: 09 Jul 2004, 14:11:42 »
Save this script (explosion.sqs) in your mission folder:
Code: [Select]
;Script by MP - markpalmer@hotmail.com
;Based on script created by David Berka (David.Berka@nmi.at) respect is due

;creates a large explosion at an object location, vehicle, infantry etc..
;can be easily modified to accept coords, but you know that already ;-)
;
;modified a little by ponq, added shell selection.
;and number of explosions wanted
;syntax: [Location/unit to explode, ammotype, 1] exec "explosion.sqs"
;eg [m113A, "LaserGuidedBomb", 2] exec "explosion.sqs"
;would create 2 big booms (LGB's) at the M113A.



;?!(local server):exit
; if you want the this for MP, add a gamelogic at your map named Server. UNcomment the previous line.

_Unit = _this select 0
_AmmoType = _this select 1
_AantalBommen= _this select 2

_keer=1

#loop1
_Explosion = GetPos _Unit

_cx = _Explosion select 0
_cy = _Explosion select 1
_cz = _Explosion select 2

_tempObj = _AmmoType camCreate[_cx, _cy, _cz]

~0.3
;this creates a short delay between the bombs. You could modify this without probs.

_tempobj = objNull

_keer = _keer + 1

? _keer > _aantalBommen : exit

~0.1
goto "loop1"

exit
« Last Edit: 09 Jul 2004, 14:14:33 by ponq »

Dubieman

  • Guest
Re:Blowing stuff up!
« Reply #2 on: 09 Jul 2004, 16:43:09 »
If you want a certain coordinate to get blasted, use a gamelogic or marker that's invisible or empty.

But cool script, I'll take it too if I ever need some explosion of sorts. :)

shadow99

  • Guest
Re:Blowing stuff up!
« Reply #3 on: 09 Jul 2004, 17:15:29 »
AAAAAAAAAAAAAAAAAAAAAAAAAAAAWESOME.

Thanks man.

Boom...

DBR_ONIX

  • Guest
Re:Blowing stuff up!
« Reply #4 on: 09 Jul 2004, 21:44:08 »
An easier way to do this is put the following code in a units INIT Field
Code: [Select]
explo01 = "bomb" camcreate [getpos this select 0, getpos this select 1, getpos this select 2]

If your puting it in a trigger, change "this" to the unit's name

Oh, you can change the bomb bit to loads of stuff, some are ::
laserguidedbomb (Thats the biggest OFP explosion)
mortar (I think)
heat102 (Again, I think)

Theres loads more :)
- Ben

shadow99

  • Guest
Re:Blowing stuff up!
« Reply #5 on: 10 Jul 2004, 03:56:26 »
Even better...

But do I have to create a camera view of the explosion? I already have camera views scripted in my Intro and I just want an M113 to explode as the camera is moving past.

m21man

  • Guest
Re:Blowing stuff up!
« Reply #6 on: 10 Jul 2004, 06:02:45 »
Quote
But do I have to create a camera view of the explosion?
In this case, the camcreate command is being used to create a shell, not a camera ;) .

cameronmc

  • Guest
Re:Blowing stuff up!
« Reply #7 on: 10 Jul 2004, 06:16:49 »
Amen, bro, amen.

shadow99

  • Guest
Re:Blowing stuff up!
« Reply #8 on: 10 Jul 2004, 06:25:55 »
Excellent. So is there a list anywhere with all the different methods of using this code?

Eg "bomb"?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Blowing stuff up!
« Reply #9 on: 10 Jul 2004, 10:10:14 »
Weapon and ammo list in the ed depot.
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Blowing stuff up!
« Reply #10 on: 10 Jul 2004, 10:27:58 »
Thanks.

bored_onion

  • Guest
Re:Blowing stuff up!
« Reply #11 on: 11 Jul 2004, 15:08:51 »
check the scripts on ofpec for artillery scripts - in a mission im making at the moment i used one called "barragearea.sqs" which can create single explosions or giagantic barrages so dense it could crash your PC  :o. i'd recommend this to you, even if you weren't doing single explosions!