Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
xTWx PREDATOR X

Hud timer

Recommended Posts

Hopefully an easy one. How do i get a count down timer to appear in the hud? I can have par time and play time. But i want a custom timer counting down the end of the match.

Share this post


Link to post

I think if you want it in the HUD in the top right corner it's a bit of a pain. I think you have to set a timer that each second subtracts 1 from an integer and have that integer display in the HUD. But then you have the issue that it'll be in seconds, so then you need a second thing to convert 60 seconds into a minute.


Alternatively, you can just start a timer and select the option to "show on HUD".

Share this post


Link to post

I see. Thankyou. Yeah really not keen on the timer showing on hud option. Looks a bit cheap. I'll go through the hassle of the first option.

Also how pn earth do you use the custom hud display? I have used variables in the hud and they work great. They are custom ones surely? So what then are the custom ones and how do they work?

Share this post


Link to post

You can copy the code out of my map called BFG blast fest. Just search for it and open it in the editor. It's just a regular countdown timer though and it is not converted into minutes and just counts down in seconds. I asked on here how to do a conversion but no one could tell me. Let me know if you figure it out.

Share this post


Link to post

The custom variables could be things like team resources. On my map I wanted to display the current funds in the hud.

Share this post


Link to post

Yeah i understand that. But what i mean is in the hud options you have different options like par time etc. Then you have variables as you mentioned above. Then you have custom. Which from what i can tell is completely pointless and has no use at all.
???

Share this post


Link to post

I was thinking about how to convert 60 seconds into one minute.

I think it involves one string variable, two integers, and 1 counter.

You need one integer that tracks seconds. You need another integer that tracks minutes. You need a countdown timer that gets signaled every 60 seconds. And you need a string variable that gets built everytime any of the integers are changed.

Okay. You have an integer variable for seconds, which maxes at 60. Once it reaches 60, have it signal the minute integer (add one to it). So, every 60 seconds you are adding 1 to the minute integer.

Now, whenever either integer changes, build the string variable. The string should contain two parts. The first part is the integer minute value and the second part is the integer second value.

Then, have the HUD display the string variable that's being built.

I think that'll work.

Share this post


Link to post

I saw someone has done the conversion and made it work when I was playing online. I just can't remember the freaking map

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×