SBarInfo game timer?

Discuss all aspects related to modding Zandronum here.
Post Reply
LanHikariDS
New User
Posts: 16
Joined: Thu Aug 11, 2016 7:52 am
Contact:

SBarInfo game timer?

#1

Post by LanHikariDS » Tue Feb 21, 2017 4:47 pm

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?

User avatar
Cutman
 
Posts: 66
Joined: Mon Jun 04, 2012 2:25 pm
Contact:

Re: SBarInfo game timer?

#2

Post by Cutman » Tue Feb 21, 2017 5:48 pm

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

LanHikariDS
New User
Posts: 16
Joined: Thu Aug 11, 2016 7:52 am
Contact:

Re: SBarInfo game timer?

#3

Post by LanHikariDS » Wed Feb 22, 2017 12:08 am

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)

User avatar
Cutman
 
Posts: 66
Joined: Mon Jun 04, 2012 2:25 pm
Contact:

Re: SBarInfo game timer?

#4

Post by Cutman » Wed Feb 22, 2017 9:04 pm

Oh right. I still don't think there's a way to do that with SBARINFO alone unfortunately.

User avatar
NachtIntellect
Forum Regular
Posts: 480
Joined: Mon Jun 11, 2012 9:20 am
Location: Bienenstock, Germany

Re: SBarInfo game timer?

#5

Post by NachtIntellect » Thu Feb 23, 2017 5:40 am

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.

User avatar
doomista
Forum Regular
Posts: 147
Joined: Sat Mar 07, 2015 6:58 pm
Location: I've been to hell. Twice

Re: SBarInfo game timer?

#6

Post by doomista » Thu Feb 23, 2017 7:23 am

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.

LanHikariDS
New User
Posts: 16
Joined: Thu Aug 11, 2016 7:52 am
Contact:

Re: SBarInfo game timer?

#7

Post by LanHikariDS » Sun Feb 26, 2017 3:39 am

Now this becomes "How do I have that get read in ACS?"

Post Reply