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: setPos a flare in the sky  (Read 3449 times)

0 Members and 1 Guest are viewing this topic.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
setPos a flare in the sky
« on: 16 Jul 2009, 03:48:15 »
I want to create a flare in the sky above the player, but I cannot get the syntax right. I know how to create one:

fireSky = "FlareYellow_M203" createVehicle (position player);

But how do I make it appear 150 meters above the player, without setPos'ing it after the creation? The flare will not light up if it's created at zero height and then setPosed, it seems...
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: setPos a flare in the sky
« Reply #1 on: 16 Jul 2009, 04:16:57 »
Just create it 150m above the player:

Code: [Select]
fireSky = "F_40mm_Yellow" createVehicle (player modelToWorld [0,0,150]);


Edit: Correction. The previous version was untested and plain wrong.
« Last Edit: 16 Jul 2009, 05:17:59 by Worldeater »
try { return true; } finally { return false; }

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: setPos a flare in the sky
« Reply #2 on: 16 Jul 2009, 09:16:25 »
modelToWorld... brilliant. I completely forgot about that one. Thank you.
OFPEC | Intel Depot
RETARDED Ooops... Retired!