Arma 3
Cpl. Hill May 31, 2020 @ 3:04pm
Help with timer script
i made a mission where you have to find a unit within time limit let just say its 1 hour and if you dont find him in 1 hour the mission failed, but if you find him before 1 hour i dont want the mission to just end, i just want the timer to stop and i can do more stuff like extracting the unit with all the time in the world, the problem with countdown module is the timer keep going even if i find the unit which lead to mission failed when timer end
< >
Showing 1-5 of 5 comments
Cpl. Hill May 31, 2020 @ 5:49pm 
first of all i dont understand how and where do i write the script or what im supposed to write, i understand the logic but im here looking for instructions, something like place a trigger blah blah blah put scripting command "things"; blah blah, something like that
Cpl. Hill May 31, 2020 @ 11:56pm 
where do i write the "my_variable = true"? in trigger condition?
Fenris 89 Jun 2, 2020 @ 8:06am 
Timer script as hint:

Save them as timer.sqf in your mission folder\ scripts and activate them with an trigger:

trigger1 :

Name: timer
size 10x10x5
activation: player side
On Act: nul = [] execVM "scripts\timer.sqf";

timer.sqf:

[]spawn
{
_missionTimer = 3600;
while {_missionTimer > 0} do
{
hintSilent format["Time Left: %1", _missionTimer];
_missionTimer = _missionTimer - 1;
sleep 1;

["epicFail", false, 2] call BIS_fnc_endMission;
};
};

But i did´nt know how to stop the timer!
Last edited by Fenris 89; Jun 2, 2020 @ 8:48am
Dalton Aug 21, 2024 @ 11:16am 
I'm looking for a start timer script and finish timer using triggers. Enter a gate, in the trigger activate start timer. Last gate has a finish total time trigger
MATTXYO Sep 30, 2024 @ 4:23pm 
Originally posted by woodoc7:
I'm looking for a start timer script and finish timer using triggers. Enter a gate, in the trigger activate start timer. Last gate has a finish total time trigger
Quick and simple one:

Trigger 1 On Activation: startTime = time;

Trigger 2 On Activation: hint format ["Total Time: %1 seconds", (time - startTime)toFixed 1];
< >
Showing 1-5 of 5 comments
Per page: 1530 50