HeyHiHello 0 Posted October 17, 2006 ways to make countdown clock in scrreen while playing game?? 5 minutes? Thank you1 Share this post Link to post Share on other sites
Chris Death 0 Posted October 17, 2006 errm - wait - this don't work that way This is not a place "you order / they serve" It's more like: "hey - i got that mission where i want to do this or that but i don't have a clue how to - could someone please explain me or give me a hint where to find that" ~S~ CD Share this post Link to post Share on other sites
mandoble 1 Posted October 17, 2006 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ;mandotimer.sqs ;arguments: ; resolution in seconds, step in second between timer checks ; timer limit in seconds ; timer direction 1 counting up, -1 counting down ; Show elapsed time every timer check? true/false ; script to be executed when timeout, "" if not needed ; script to be executed if timer is stopped before timeout, "" if not needed ; ; To end timer before timeout, set gobal variable globalstoptimer to true ; global variable globalelapse keeps elapsed time since timer start ; ;Example: ; 1 hour left to accomplish something (countdown type), timer checks every 5 seconds showing elapsed time ; [5, 3600, -1, true, "gameover.sqs", "youwon.sqs"]exec"mandotimer.sqs" ; _resolution = _this select 0 _limit = _this select 1 _dir = _this select 2 _show = _this select 3 _scripttimeout = _this select 4 _scripttimerend = _this select 5 _elapsed = 0 globalstoptimer = false ?_dir == -1:_elapsed = _limit;_limit = 0 #check _timeini = time @((time - _timeini) > _resolution) _elapsed = _elapsed + _dir * _resolution ?!_show:goto "continue" _h = (_elapsed/3600)- ((_elapsed/3600)mod 1) _sr = _elapsed - _h*3600 _m = (_sr/60)- ((_sr/60)mod 1) _s = _elapsed - _h*3600 - _m*60 _hp = "0" _mp = "0" _sp = "0" ?_h > 9:_hp = "" ?_m > 9:_mp = "" ?_s > 9:_sp = "" cutText[format["%1%2:%3%4:%5%6",_hp,_h, _mp,_m,_sp,_s], "PLAIN DOWN"] #continue globalelapsed = _elapsed ?globalstoptimer: goto "timerend" ?_elapsed != _limit:goto "check" ?_show:cutText["TIMER END REACHED", "PLAIN DOWN"] ?_scripttimeout != "":[]exec _scripttimeout exit #timerend ?_scripttimerend != "":[]exec _scripttimerend exit Share this post Link to post Share on other sites
HeyHiHello 0 Posted October 17, 2006 many gracious thanks Share this post Link to post Share on other sites