Evilhardt 1 Posted July 13, 2013 (edited) Hey, I found this script to spawn flares: Flare = "F_40mm_Red" createVehicle [getMarkerPos "FlareMark" select 0, getMarkerPos "FlareMark" select 1, 250]; It works and all, but the flares just won't fall down. They just sit there in the sky, where they were spawned. This does not look nice at all. Is there a way to fix this? Edit: nvm, I found a solution suddenly...: http://forums.bistudio.com/showthread.php?149510-How-to-create-a-flare-in-the-sky Edited July 13, 2013 by Evilhardt Share this post Link to post Share on other sites
Evilhardt 1 Posted July 13, 2013 Actually I do still have an unsolved problem here. Combining the two codes makes the flare only fall straight down, like in a straight line vertical line. I wonder if there is a way to make it fall in a trajectory and accelerate a little while falling. Share this post Link to post Share on other sites
kahna 13 Posted July 13, 2013 (edited) EDIT: Apparently setVelocity doesn't work the way we would think, just changes the starting positions of the flares in relation to their marker/object. X = (+)North/(-)South, Y = (+)East/(-)West, Z = Rate of (+)ascent/(-)descent. OP's code, using a marker: _Flare = "F_40mm_Red" createVehicle [getMarkerPos "FlareMark" select 0, getMarkerPos "FlareMark" select 1, 250]; _Flare setvelocity [35,0,-0.1]; And a snippet of sample code from my Helicopter Pilot bailout script ("mayday!") for deploying flares from an object such as a Helicopter. _heli = vehicle player; hint "Emergency Flares Deployed!"; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [35,0,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [-35,0,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [0,35,-0.1]; _rflare = "F_40mm_Red" createVehicle (position _heli); _rflare setVelocity [0,-35,-0.1]; Edited July 13, 2013 by Kahna Share this post Link to post Share on other sites
Evilhardt 1 Posted July 13, 2013 Thx, but changing the coordinate values only moves the spawn location of the flare for me. It will still drop in a straight line. Only away from the marker above which it is supposed to spawn. Share this post Link to post Share on other sites
kahna 13 Posted July 13, 2013 Thx, but changing the coordinate values only moves the spawn location of the flare for me. It will still drop in a straight line. Only away from the marker above which it is supposed to spawn. Yeah sorry, I've just started testing it myself and I noticed what you mean. Hopefully someone has the answer we need, but at least we know how to spread out the flares. Share this post Link to post Share on other sites
kylania 567 Posted July 13, 2013 I'd say this is more of a bug than something we need to work around. Report the bug and let BIS fix it. :) Share this post Link to post Share on other sites
MadocComadrin 12 Posted July 13, 2013 I've used this in a mission and it seems to work: veh = createVehicle ["F_20mm_Green", [po select 0, po select 1, 5], [], 0, "FLY"]; veh setVelocity [20,0,20]; Where "po" is a position array I got from something else. What this does is (in game) is shoot the flare upwards and to the right. Note that the air will slow down the flare dramatically, so don't expect it to go very far. Also, changing the velocity vector to [0,0,20] creates a flare that flies straight up and stays there. Share this post Link to post Share on other sites
Evilhardt 1 Posted July 13, 2013 (edited) I don't understand. What am I supposed to do with the "po" to make that work? Edit: NVM I got it to work. Thx. Edited July 13, 2013 by Evilhardt Share this post Link to post Share on other sites