Hello, if possible could you explain to me what would need to be done to prevent players from using this Halo whenever they want. After a particular player uses the Halo I would like them to have to wait 15 minutes before they could use it again. I would also like a hint that lets a particular player know how long they have to wait to use it again. If you could explain in detail or post some code that would be awesome.
Edit:
I found this while looking through the forums (I modified the hint)
if (diag_tickTime < (uiNamespace getVariable ['tag_cooldown',-1])) exitWith {
hint (format ['HQ: \n Next jump available in %1 seconds.',(round ((uiNamespace getVariable ['tag_cooldown',-1]) - diag_tickTime))]);
};
_cooldown = 900; // cooldown duration in seconds
uiNamespace setVariable ['tag_cooldown',(diag_tickTime + _cooldown)];
and inserted it into the add action in the MGI Halo.sqf like so...
_pole addAction ["<t color='#00ffff'>HALO jump</t>",{
params ["_target","_caller","_id","_parameters"];
if (diag_tickTime < (uiNamespace getVariable ['tag_cooldown',-1])) exitWith {
hint (format ['HQ: \n Next jump available in %1 seconds.',(round ((uiNamespace getVariable ['tag_cooldown',-1]) - diag_tickTime))]);
};
_cooldown = 900; // cooldown duration in seconds
uiNamespace setVariable ['tag_cooldown',(diag_tickTime + _cooldown)];
openmap [true,false];
hint "Pilot: \n Select location for LZ";
_parameters params ["_jump_alt","_jump_safety"];
It seems to work as intended with just me sampling the MP mission in the editor that I'm creating, but I have no idea if the timer will prevent everyone from using the Halo until the time runs out or if it will only affect the player that used the Halo. I'm very new to scripting, but I'm trying to learn as much as I can and don't really have anyone to help me test the functionality right now.