OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: FLBEE on 12 Jan 2005, 00:17:17

Title: Simulate air to air hit w /explosion?
Post by: FLBEE on 12 Jan 2005, 00:17:17
I have a A10 flying thru a cutscene and I want it to act like it just got hit by a missle.

I tried to setpos a laserguidedbomb, a heat 120, shell120  etc at the loctation and height of the A10--but they don't make contact with it , they just fall to the ground and pop.

I made my A10 setdammage 1, but doesn't look cool like a actual explosion.

How do I make it blow up in the air?

Thx for your time.
Title: Re:Simulate air to air hit w /explosion?
Post by: johnnyboy on 12 Jan 2005, 00:37:44
For some strange reason, you need to camcreate two bombs at the same location.  The first one explodes at the ground, the second one explodes at the height you specify.

Try repeating your camcreate bomb line (two identical lines of code).  

I've seen this technique in the flak scripts found in the scripts section of the Editor's depot.  Good luck.
Title: Re:Simulate air to air hit w /explosion?
Post by: Dubieman on 12 Jan 2005, 00:43:10
Reason is that the shell or laserguidedbomb is an object that explodes on contact. That's why you need to have two sets of explosives.

I don't know why there is an explosion on the ground, but that shouldn't hurt your cutscene. And if you still need some help, there are explosion scripts in the editor depot. ;)
Title: Re:Simulate air to air hit w /explosion?
Post by: Triggerhappy on 12 Jan 2005, 04:13:41
i've done that before but i don't get an explosion on the ground...
Title: Re:Simulate air to air hit w /explosion?
Post by: XCess on 12 Jan 2005, 04:59:43
name the bomb and setDammage it. e.g:

_bomb = "laserguidedbomb" camCreate getPos plan
_bomb setDammage 1

Note: You might need to put a very short wait in between the two in the script, just chuckit in ur camera.sqs.

i think that's how I created my flak script, also if u setDammage it back to 0 and re-use it in a flak script (i know this isnt what ur askin for btw) it saves having to use multiple objects.
Title: Re:Simulate air to air hit w /explosion?
Post by: FLBEE on 13 Jan 2005, 23:26:59
Thanks very much!  ;D

..solved..