OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Tenchu on 20 Jan 2003, 17:33:42
-
If I had this in a script
bomb1 = "grenade" camCreate getpos target
how would i make it explode 3 metres behind the target
Thanks ;D
-
bomb1 = "grenade" camCreate [(getpos target select 0) -3,(getpos target select1),(getpos target select 2)]
try that one
-
To get it to always explode behind the target you would need to work it out by using getDir and all sorts of other mathematical stuff that I don't understand :-\ You could also do it as mentioned above, although if the unit is facing north, that line will create the bomb 3 metres to the left ;)
-
Thanks guys ;D
Artak's solution is what i was looking for.
It does not need to explode behind the target, just near enough to damage it and make the player duck lol ;D
"all sorts of other mathematical stuff that I don't understand" me neither lol
Thanks again