Knight Trane 0 Posted November 29, 2008 Hey guys, I was wondering how to make a 40mm flare float stationary after ignition. I have a trigger with this in the Init field: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">flare1 = "F_40mm_Red" createVehicle [getPos tresflare1 select 0, getPos tresflare1 select 1, 150]; I have a Gamelogic named "tresflare1" This works as is, but its not really what I'm looking for. The Flare needs to be about 1m off the ground and not move. This would create a tripflare effect. Not a pop-up flare effect. Can I use Fired eventhandler with GameLogic as the "unit"? What would be the "muzzle"? Any ideas? Thanks Share this post Link to post Share on other sites
=Odin= 0 Posted November 30, 2008 G'day, give this a go , its a crudley fasioned .sqs loop that works flare.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_cnt = 0; flare1 = "F_40mm_Red" createVehicle [getPos tresflare1 select 0, getPos tresflare1 select 1, 35]; ~3.5 #loop ; _cnt == "amount of times loop is run befor it ends" ?(_cnt == 400) : goto "end"; flare1 setPosASL [ (getPosASL tresflare1 select 0) + 0.199, (getPosASL tresflare1 select 1) - 0.199, (getPosASL tresflare1 select 2) + 2]; ~0.001 _cnt = _cnt + 1; goto "loop" ~1 #end exit the (_cnt == 400) part lasts around 20 secs GL Odin Share this post Link to post Share on other sites
Knight Trane 0 Posted November 30, 2008 =Odin=, That worked like a charm. I'm gonna play around with the numbers and see what happens. This should make for some cool night missions. Thanks again Share this post Link to post Share on other sites