OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: nominesine on 16 Jul 2009, 03:48:15

Title: setPos a flare in the sky
Post by: nominesine 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...
Title: Re: setPos a flare in the sky
Post by: Worldeater 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.
Title: Re: setPos a flare in the sky
Post by: nominesine on 16 Jul 2009, 09:16:25
modelToWorld... brilliant. I completely forgot about that one. Thank you.