BlackbirdSD 15 Posted February 17, 2021 How do I make a flare fire every 30 seconds in specific areas? Thanks Share this post Link to post Share on other sites
stanhope 412 Posted February 17, 2021 Which flares? The ones from the starter pistol, the ones fired from under-barrel 40mm grenade launchers, modded ones, ...? Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 18, 2021 Under barrel. Parachute flares Share this post Link to post Share on other sites
Joe98 92 Posted February 18, 2021 1. Have a practise. Create a trigger, walk into the trigger and watch the flare fire. 2, Place a man on a road in an out of the way place. Have him run through a trigger, use a cycle way point so that he runs back and forth. Every time he runs through the trigger a flare fires. 3. Now make it to that when he runs through a trigger at location "A" a flare fires at location "B". Out of interest this works for all explosives, artillery, mortars hand grenades, aircraft bombs, everything. . 2 Share this post Link to post Share on other sites
wogz187 1086 Posted February 18, 2021 @BlackbirdSD, Here's a simple flare function, you_flare={ params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]]; missionNameSpace setVariable ["do_flares", true]; while {missionNameSpace getVariable ["do_flares", false]} do { private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); _flr setVelocity [0,0,-10]; sleep _time } }; [] spawn you_flare You may configure the spawn params to customize the effect. Reveal hidden contents based on: Have fun! 1 Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 19, 2021 On 2/18/2021 at 4:57 PM, wogz187 said: @BlackbirdSD, Here's a simple flare function, you_flare={ params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]]; missionNameSpace setVariable ["do_flares", true]; while {missionNameSpace getVariable ["do_flares", false]} do { private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); _flr setVelocity [0,0,-10]; sleep _time } }; [] spawn you_flare You may configure the spawn params to customize the effect. Reveal hidden contents based on: Have fun! Does this get put in a trigger? Share this post Link to post Share on other sites
wogz187 1086 Posted February 19, 2021 @BlackbirdSD, To spawn anything in a trigger you need a handle or a call scope, you_flare={ params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]]; missionNameSpace setVariable ["do_flares", true]; while {missionNameSpace getVariable ["do_flares", false]} do { private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); _flr setVelocity [0,0,-10]; sleep _time } }; call { [] spawn you_flare } You may paste the above in the On Activation field of a trigger. Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 19, 2021 On 2/19/2021 at 2:31 AM, wogz187 said: @BlackbirdSD, To spawn anything in a trigger you need a handle or a call scope, you_flare={ params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]]; missionNameSpace setVariable ["do_flares", true]; while {missionNameSpace getVariable ["do_flares", false]} do { private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); _flr setVelocity [0,0,-10]; sleep _time } }; call { [] spawn you_flare } You may paste the above in the On Activation field of a trigger. Thats awsome thanks. Only problem is the flare isnt as bright as the one shot from the grenade launcher. Any idea why? Thanks Share this post Link to post Share on other sites
Joe98 92 Posted February 20, 2021 He has used a 20mm flare instead of a 40mm flare Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 20, 2021 On 2/20/2021 at 4:30 AM, Joe98 said: He has used a 20mm flare instead of a 40mm flare 40mm is much better. Thanks Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 20, 2021 On 2/18/2021 at 4:57 PM, wogz187 said: @BlackbirdSD, Here's a simple flare function, you_flare={ params [["_pos", player], ["_color", "red"], ["_time", 30], ["_area", [0,100,200]]]; missionNameSpace setVariable ["do_flares", true]; while {missionNameSpace getVariable ["do_flares", false]} do { private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos ModelToWorld _area); _flr setVelocity [0,0,-10]; sleep _time } }; [] spawn you_flare You may configure the spawn params to customize the effect. Reveal hidden contents based on: Have fun! Can you explain how these parts work? ["_area", [0,100,200]]]; and _flr setVelocity [0,0,-10]; Thanks Share this post Link to post Share on other sites
stanhope 412 Posted February 20, 2021 Set velocity is to have it move downward upon spawn, _area is a misleading name (so is _pos btw) as it's used by modelToWorld to determine where in relation to the player the flare will spawn. In this case, 200 meters above the player and 100 meters in front (I think, might be off to the sides as well) Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 20, 2021 On 2/20/2021 at 9:38 AM, stanhope said: Set velocity is to have it move downward upon spawn, _area is a misleading name (so is _pos btw) as it's used by modelToWorld to determine where in relation to the player the flare will spawn. In this case, 200 meters above the player and 100 meters in front (I think, might be off to the sides as well) How do I make each flare random within a 100m radius? Share this post Link to post Share on other sites
stanhope 412 Posted February 21, 2021 Use the alternate syntax 2 of getpos with random. Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 21, 2021 On 2/21/2021 at 9:26 AM, stanhope said: Use the alternate syntax 2 of getpos with random. Can you show me an example please? Thanks Share this post Link to post Share on other sites
stanhope 412 Posted February 21, 2021 private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos getPos [10 + random 90, random 360]); Share this post Link to post Share on other sites
BlackbirdSD 15 Posted February 22, 2021 On 2/21/2021 at 8:53 PM, stanhope said: private _flr = (format ["F_20mm_%1", _color]) createvehicle (_pos getPos [10 + random 90, random 360]); thank you ill try it Share this post Link to post Share on other sites