Palmi69 2 Posted October 20, 2022 (edited) hi everyone, on editor map: -a logic named "LogA" -a trigger with "radio alpha", "repeatable", and "activation" execVM "Arty.sqf"; my Arty.sqf : onMapSingleClick {LogA setPos _pos;[Player,Position LogA,3,50] spawn DAC_fCallArti;}; it works fine but the process is repeated forever, how to do to stop process after only one click on map ? Thanks everyone for help Edited October 20, 2022 by Palmi69 Share this post Link to post Share on other sites
pierremgi 4743 Posted October 20, 2022 No need for logic logA (for this script). You can: onMapSingleClick {[Player,_pos,3,50] spawn DAC_fCallArti;}; Anyway, add a variable: artyCount = 5; // or else onMapSingleClick {artyCount = artyCount -1; if (artyCount >=0) then {[Player,_pos,3,50] spawn DAC_fCallArti} }; You can do that with a boolean also: onMapSingleClick {if (isNil "artyClick") then {artyClick = TRUE; [Player,_pos,3,50] spawn DAC_fCallArti} }; Prefer the stackable version. Other method: addMissionEventHandler ["MapSingleClick", { params ["_units", "_pos", "_alt", "_shift"]; [Player,_pos,3,50] spawn DAC_fCallArti; removeMissionEventHandler ["MapSingleClick",_thisEventHandler]; }]; 1 Share this post Link to post Share on other sites
Larrow 2803 Posted October 20, 2022 43 minutes ago, Palmi69 said: how to do to stop process after only one click on map ? onMapSingleClick { [Player,_pos,3,50] spawn DAC_fCallArti; onMapSingleClick ""; //Remove map click event }; 1 Share this post Link to post Share on other sites
Palmi69 2 Posted October 20, 2022 tanks for help pierremgi and Larrow Share this post Link to post Share on other sites