OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Homefry31464 on 22 Jan 2005, 02:57:39
-
Alright, here is my problem. I've got a bomb that I have camcreated under a plane, and I need it to have the same speed as the plane, and moving in the same direction. How would I go about doing this? ???
-
_strikeplane = _this select 0
_strikeplane sideChat "Target aquired"
_numberofbombs = 4
_i = 0
#loop
_bomb = "laserGuidedBomb" camCreate [(getPos _strikeplane select 0)+((random 10)-5),(getPos _strikeplane select 1)+((random 10)-5),(getPos _strikeplane select 2)-3]
_bomb setDir (getDir _strikeplane)
_bomb setVelocity [(velocity _strikeplane select 0)*0.2,(velocity _strikeplane select 1)*0.2,(velocity _strikeplane select 2)*0.2]
_i = _i + 1
~0.2
? _i < _numberofbombs : goto "loop"
_strikeplane sideChat "Bombs dropped"
exit