Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
andersson

DAC3 player artillery

Recommended Posts

If anyone can help me here I would be grateful.

Im using DAC3 in my mission and I want one of the players, the 'commander', to be able to send arty whereever the other players need it. So I did as the turorial mission and readme told me too.

I made this script:

private ["_ord"];
_ord = _this select 0;

hint format["Click on the map to call in arty on that position."];

if(player == co) then
{
   if(_ord == 7) then
   {
       onMapSingleClick "[co,_pos,7,50] spawn DAC_fCallArti;";
       if (true) exitwith {};
   };
   if(_ord == 8) then
   {
       onMapSingleClick "[co,_pos,8,50] spawn DAC_fCallArti;";
       if (true) exitwith {};
   };
   if(_ord == 9) then
   {
       onMapSingleClick "[co,_pos,9,50] spawn DAC_fCallArti;";
       if (true) exitwith {};
   };
}
else
{
   hint format["Only the commander can call in artillery.\n\nPlease request artillery from your commander."];
   if (true) exitwith {};
};

To activate that script I have 3 radiotriggers with 'On Act.' looking like this:

artycall = [7] execVM "artycall.sqf";

It all works just fine EXCEPT when the script is called one time artillery is called EVERYTIME the commander clicks on the map (thats why I tried to add the line 'if (true) exitwith {};' but it didnt help).

How do I limit the 'onMapSingleClick' to just 1 click? It makes the rest of the commanding duties quite dangerous lol...

Thank you.

Edited by andersson

Share this post


Link to post
Share on other sites
Sign in to follow this  

×