OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: blekzebbed on 04 Dec 2005, 19:52:34

Title: Exploding barrels
Post by: blekzebbed on 04 Dec 2005, 19:52:34
Hi guys

here is the issue: I have a barrel + a script to let the barrel explode

When I move the barrel with another script...(Barrel will hang under a chopper and be thrown down) , the barrel refuses to explode. Who can help me?

I know the story is vague, that's why here is a demo mission with the story
better explained and the scripts with it. So the issue is probably easy to find

Just download it and see.....
Blekzebbed
Title: Re:Exploding barrels
Post by: 456820 on 04 Dec 2005, 20:27:33
let me get this straight the chopper is going to let go of the barrel ?
if so then have a loop checking when the barrel is about 1m above the ground when it is set the barrels dammage to 1 that might work

Code: [Select]
#loop
_heightbarrel = getpos barrel select 2

? _heightbarrel <= 1 : goto "dammage"
~2
goto "loop"

#dammage
barrel setdammage 1

exit

that may help not sure if the syntax is correct but thats along the lines of you will want
Title: Re:Exploding barrels
Post by: marcus3 on 04 Dec 2005, 20:45:44
maybe u can use thease scripts?, hope this helps :)
Title: Re:Exploding barrels
Post by: blekzebbed on 06 Dec 2005, 14:45:19
Very cool those scripts you send in. If you don't use a timer with that example I've got you get a massive explosion each time the barrel hits the ground. Very cool work