Page 1 of 1

SBarInfo game timer?

Posted: Tue Feb 21, 2017 4:47 pm
by LanHikariDS
I'm currently working on my own game mode that involves teams taking territory around a map until the timer runs out. I'm currently working on the Custom HUD for the game mode in SBARINFO, and I can't seem to find what string to use for DrawString to reference how much time is left in the game. Does this feature even exist, and if so, what is the string to use?

Re: SBarInfo game timer?

Posted: Tue Feb 21, 2017 5:48 pm
by Cutman
I'm afraid you'll have to delve in to ACS to get and display the game time, I don't think there's a clean way to do it in SBARINFO yet.

https://zdoom.org/wiki/timer

Re: SBarInfo game timer?

Posted: Wed Feb 22, 2017 12:08 am
by LanHikariDS
Ah, Cutman, I think you misunderstand me. That just shows how long the player has been in the map, which can be cleanly done in SBARINFO. What I want is, say I'm playing a Deathmatch with a five minute time limit. I want this counter to display how much time REMAINS (i.e. Counting down)

Re: SBarInfo game timer?

Posted: Wed Feb 22, 2017 9:04 pm
by Cutman
Oh right. I still don't think there's a way to do that with SBARINFO alone unfortunately.

Re: SBarInfo game timer?

Posted: Thu Feb 23, 2017 5:40 am
by NachtIntellect
Yeah which is rather unfortunate, SbarInfo seriously needs an update, I have a similar script counting upwards via ACS, I am thinking it wouldn't be too much of a hassle to make it count backwards.

Re: SBarInfo game timer?

Posted: Thu Feb 23, 2017 7:23 am
by doomista
This has its limitations, but at least you can still do the graphic part in SBARINFO and implement the counter itself in ACS with globalVar or globalArray https://zdoom.org/wiki/DrawNumber.

Re: SBarInfo game timer?

Posted: Sun Feb 26, 2017 3:39 am
by LanHikariDS
Now this becomes "How do I have that get read in ACS?"