domcho 20 Posted December 30, 2011 Hello guys. I am making a mission which is during the night, and I wanted to know how can I spawn green flares using the radio and then map clicking on the map position so a green flare appears. Thank you! Share this post Link to post Share on other sites
Aldo15 11 Posted December 30, 2011 I did a basic script for me, and it works. This is: I did: Add a trigger with next parameters: *Activation : Radio Alpha *On Activation : [] exec "Radio.sqs" these are the scripts: -First script : Radio.sqs onMapSingleClick {[_shift,_alt,_pos] exec "flares.sqs"} hint "Press shift+alt on the map to launch green flares" exit -Second script : Flares.sqs ? ! (_this select 0) : exit ? ! (_this select 1) : exit _pos = _this select 2 [west,"hq"] sideChat format ["Launching green smokes to %1" , _pos] ~3 flare = "FlareGreen" camcreate [(_pos select 0) , (_pos select 1) , 150] ~0.5 exit This is a basic script it doesn't need much commands to work. I hope it helps Cheers, Aldo15 Share this post Link to post Share on other sites
domcho 20 Posted December 30, 2011 I did a basic script for me, and it works. This is:I did: Add a trigger with next parameters: *Activation : Radio Alpha *On Activation : [] exec "Radio.sqs" these are the scripts: -First script : Radio.sqs onMapSingleClick {[_shift,_alt,_pos] exec "flares.sqs"} hint "Press shift+alt on the map to launch green flares" exit -Second script : Flares.sqs ? ! (_this select 0) : exit ? ! (_this select 1) : exit _pos = _this select 2 [west,"hq"] sideChat format ["Launching green smokes to %1" , _pos] ~3 flare = "FlareGreen" camcreate [(_pos select 0) , (_pos select 1) , 150] ~0.5 exit This is a basic script it doesn't need much commands to work. I hope it helps Cheers, Aldo15 Thanks, it works. But is it possible to click on the map without holding any buttons? Share this post Link to post Share on other sites
Aldo15 11 Posted December 31, 2011 Yes, it's posible. Fix it Radio.sqs onMapSingleClick {_pos] exec "flares.sqs"} hint "Click on the map to launch green flares" exit Flare.sqs _pos = _this select 0 [west,"hq"] sideChat format ["Launching green smokes to %1" , _pos] ~3 flare = "FlareGreen" camcreate [(_pos select 0) , (_pos select 1) , 150] ~0.5 exit Share this post Link to post Share on other sites
domcho 20 Posted December 31, 2011 Yes, it's posible.Fix it Radio.sqs onMapSingleClick {_pos] exec "flares.sqs"} hint "Click on the map to launch green flares" exit Flare.sqs _pos = _this select 0 [west,"hq"] sideChat format ["Launching green smokes to %1" , _pos] ~3 flare = "FlareGreen" camcreate [(_pos select 0) , (_pos select 1) , 150] ~0.5 exit It gives an error. When I click on the map it says on the top left corner '_pos]|#| exec "flares.sqs": Error Missing ( :butbut: I copied and pasted everything that you wrote here. Share this post Link to post Share on other sites
QBA69 1 Posted December 31, 2011 it's only a small typo - no worries;) onMapSingleClick {[color="Red"][[/color]_pos] exec "flares.sqs"} Share this post Link to post Share on other sites
domcho 20 Posted December 31, 2011 it's only a small typo - no worries;) onMapSingleClick {[color="Red"][[/color]_pos] exec "flares.sqs"} It works. Everything is OK now! Thanks a lot to both of you :bounce3: Share this post Link to post Share on other sites
Aldo15 11 Posted December 31, 2011 Oops, Maybe I deleted "[" When I was writting it again. Im so sorry. Share this post Link to post Share on other sites
domcho 20 Posted December 31, 2011 Oops, Maybe I deleted "[" When I was writting it again. Im so sorry. Mistakes happen sometimes :p Have a Happy New Year :D Share this post Link to post Share on other sites