How to do countdown numbers on the wall?
Quote from whupper on January 14, 2008, 5:34 amI remember seeing a thread on some forums somewhere (which may be on a different site that this one) that showed how you have numbers on a wall which counted down. But I can't seem to find it anywhere now. (They may have imported customs graphics for the digits 0-9.) Any idea how to implement such a thing?
I remember seeing a thread on some forums somewhere (which may be on a different site that this one) that showed how you have numbers on a wall which counted down. But I can't seem to find it anywhere now. (They may have imported customs graphics for the digits 0-9.) Any idea how to implement such a thing?
Quote from Hedgehog on January 14, 2008, 7:23 amI'm going to look into this for a puzzle I'm going to make coming week. So if you have no answer within a week, remind me to answer you.
I'm going to look into this for a puzzle I'm going to make coming week. So if you have no answer within a week, remind me to answer you.
Quote from Interitus on January 14, 2008, 8:29 amBecause I've tried to use those numbers and done a sort of counting with them, I wish you both good luck.
Because I've tried to use those numbers and done a sort of counting with them, I wish you both good luck.
Quote from Dewin on January 14, 2008, 1:57 pmYou're probably interested in the signage/clock/clock* textures, which you can find simply by filtering clock.
They are multiframe textures (like indicator lights, but they have more than just two). Frame 0 is '59', frame 1 is '58', etc.
So if you had a few of those ... one for seconds, one for minutes... and then a logic_timer that did IncrementTextureIndex every second for the seconds one and one that did IncrementTextureIndex every minute for the minutes one...
that'd be a start anyways. There's one actually labelled 'centiseconds', in addition to a milliseconds one that just has 6-7 frames or so that's basically a blur (rather than forcing the game to change a timer every millisecond!)
You're probably interested in the signage/clock/clock* textures, which you can find simply by filtering clock.
They are multiframe textures (like indicator lights, but they have more than just two). Frame 0 is '59', frame 1 is '58', etc.
So if you had a few of those ... one for seconds, one for minutes... and then a logic_timer that did IncrementTextureIndex every second for the seconds one and one that did IncrementTextureIndex every minute for the minutes one...
that'd be a start anyways. There's one actually labelled 'centiseconds', in addition to a milliseconds one that just has 6-7 frames or so that's basically a blur (rather than forcing the game to change a timer every millisecond!)
Quote from whupper on January 14, 2008, 9:48 pmThanks for the tips, Dewin! They helped me get it working.
I used the seconds texture. The logic_timer fired every second, counting the numbers down from 59 to 00. Excellent!
I noticed that the logic_timer kept going, and the texture went back to 59 and started counting down again. So I presume that the texture does a mod or something so that it knows when you go off the end of the images in the texture, it loops back around. That's handy.
So is it "safe" to let a logic_timer run forever without resetting it? Suppose the timer is in the last room and the numbers won't be seen until the user finally gets there. Should you have the logic_timer running from the beginning of the map? Or is it better to have a trigger that detects the player just as they enter the room and then start the timer?
Also, is there a standard texture that goes around the clock numbers, like there is for the arrows and exit door signs in Portal? Or do you have to create your own func_details and pick some textures?
Thanks for the tips, Dewin! They helped me get it working.
I used the seconds texture. The logic_timer fired every second, counting the numbers down from 59 to 00. Excellent!
I noticed that the logic_timer kept going, and the texture went back to 59 and started counting down again. So I presume that the texture does a mod or something so that it knows when you go off the end of the images in the texture, it loops back around. That's handy.
So is it "safe" to let a logic_timer run forever without resetting it? Suppose the timer is in the last room and the numbers won't be seen until the user finally gets there. Should you have the logic_timer running from the beginning of the map? Or is it better to have a trigger that detects the player just as they enter the room and then start the timer?
Also, is there a standard texture that goes around the clock numbers, like there is for the arrows and exit door signs in Portal? Or do you have to create your own func_details and pick some textures?
Quote from Hunter on January 14, 2008, 11:49 pmTwo things I'd like to chip in.
FRAMING YOUR TIMER:
There's clock.mdl, but that's for the countdown in the starting chamber, so it's pretty wide: enough room for eight digits and three separators. Not cool. However, there's nothing stopping you from using a sign_frame* prop around your timers, since each two-digit field uses a square texture.CLOCK MATERIALS:
'minutes' only has two textures: '01' and '00'.
'seconds' has everything from '59 to '00'.
'centiseconds', despite the name, actually counts 60ths of a second.
'milliseconds' has ten blurry frames.
And if you'd like to use the centis or millis, you'll have to learn how to work a material_modify_control.
Two things I'd like to chip in.
FRAMING YOUR TIMER:
There's clock.mdl, but that's for the countdown in the starting chamber, so it's pretty wide: enough room for eight digits and three separators. Not cool. However, there's nothing stopping you from using a sign_frame* prop around your timers, since each two-digit field uses a square texture.
CLOCK MATERIALS:
'minutes' only has two textures: '01' and '00'.
'seconds' has everything from '59 to '00'.
'centiseconds', despite the name, actually counts 60ths of a second.
'milliseconds' has ten blurry frames.
And if you'd like to use the centis or millis, you'll have to learn how to work a material_modify_control.
Quote from Dewin on January 15, 2008, 1:46 amwhupper wrote:So is it "safe" to let a logic_timer run forever without resetting it? Suppose the timer is in the last room and the numbers won't be seen until the user finally gets there. Should you have the logic_timer running from the beginning of the map? Or is it better to have a trigger that detects the player just as they enter the room and then start the timer?Well, if you're really trying to time something, you shouldn't start the timer until you're ready to start timing obviously
Besides, if it fires all the time, you'll get a ton of spam if you're testing your map with developer 2 on, and who wants that?
Well, if you're really trying to time something, you shouldn't start the timer until you're ready to start timing obviously
Besides, if it fires all the time, you'll get a ton of spam if you're testing your map with developer 2 on, and who wants that?
Quote from whupper on January 16, 2008, 12:43 amThanks for your input fellas. It's been really useful and I was able to everything I needed.
Thanks for your input fellas. It's been really useful and I was able to everything I needed.
Quote from Leck on January 18, 2008, 11:56 pmOkay, I was trying to do this myself, and I noticed that the clock number textures are huge, much larger than the model clock.mdl, am I missing something? the numbers in the actual start of Portal are smaller than the texture comes out as.
Okay, I was trying to do this myself, and I noticed that the clock number textures are huge, much larger than the model clock.mdl, am I missing something? the numbers in the actual start of Portal are smaller than the texture comes out as.
Quote from Bulska on January 19, 2008, 6:23 pmcan't you resize any textures you like after placing them down?
can't you resize any textures you like after placing them down?