OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: cannonfoda on 14 Apr 2003, 12:18:06

Title: attaching satchel charges
Post by: cannonfoda on 14 Apr 2003, 12:18:06
hey guys

is it possible to attach a satchel charge to an object such as a vehicle? if it is how can i do it?

thx
Title: Re:attaching satchel charges
Post by: macguba on 14 Apr 2003, 12:55:17
There are carbomb scripts in the Ed Depot, they might help.
Title: Re:attaching satchel charges
Post by: Artak on 14 Apr 2003, 12:57:54
Hello cannonfoda

This is in theory because I'm not at home and can't test it


Code: [Select]
_bomb = "pipebomb" camcreate getpos car

#loop
?!(alive car): exit
_bomb setpos getpos car
~0.2
goto "loop"

or if we were to make it a bit more fancy

Code: [Select]
_bomb = "pipebomb" camcreate getpos car

#loop
@speed car > 1
?!(alive car): exit
_bomb setpos getpos car
~0.05
goto "loop"
Title: Re:attaching satchel charges
Post by: cannonfoda on 14 Apr 2003, 13:30:10
thx i'll give them a go