Advertisement

Author Topic: setPos a flare in the sky  (Read 345 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!