Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Set a bomb's speed  (Read 646 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.