Home   Help Search Login Register  

Author Topic: Set a bomb's speed  (Read 458 times)

0 Members and 1 Guest are viewing this topic.

Homefry31464

  • Guest
Set a bomb's speed
« 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?  ???

Offline Blanco

  • Former Staff
  • ****
Re:Set a bomb's speed
« Reply #1 on: 22 Jan 2005, 03:39:24 »
Quote
_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
Search or search or search before you ask.