Welcome, Guest Sunday 20th April 2014, 22:27:11
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: setPos a flare in the sky  (Read 323 times)
0 Members and 1 Guest are viewing this topic.
nominesine
Intel Depot
Administrator
*****
Offline Offline


I'm NOT back!


WWW
« on: 16 Jul 2009, 02: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...
Logged

OFPEC | Intel Depot
RETARDED Ooops... Retired!
Worldeater
Editors Depot
Administrator
*****
Offline Offline


Suum cuique


« Reply #1 on: 16 Jul 2009, 03:16:57 »

Just create it 150m above the player:

Code:
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, 04:17:59 by Worldeater » Logged

try { return true; } finally { return false; }
nominesine
Intel Depot
Administrator
*****
Offline Offline


I'm NOT back!


WWW
« Reply #2 on: 16 Jul 2009, 08:16:25 »

modelToWorld... brilliant. I completely forgot about that one. Thank you.
Logged

OFPEC | Intel Depot
RETARDED Ooops... Retired!
Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: