Difference between revisions of "Talk:Creating a visible timer"

From Valve Developer Community
Jump to: navigation, search
 
 
(6 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
1.) In testchamber 00, the clock above both portals is in the format '''minutes : seconds : centiseconds : milliseconds'''.  But the centiseconds only counts down from 59 to 0, which makes no sense.  There are 100 centiseconds in a second.
 
1.) In testchamber 00, the clock above both portals is in the format '''minutes : seconds : centiseconds : milliseconds'''.  But the centiseconds only counts down from 59 to 0, which makes no sense.  There are 100 centiseconds in a second.
  
2.) The only way I can think of how to do this (without decompiling the first map of Portal itself) is to set a '''logic_timer''' to increase the value of a '''math_counter''' for each pair of numbers, which would be 1 time per second for the seconds space, 60 times (!) per second for the centiseconds space, and something like 10 times per second for the  milliseconds space (this texture has 10 blurred frames).  So this amounts to 71 times per second that a logic_timer will change the value of a math_counter, and then the math_counter changes the texture index of the clock number textures.  Is there a more efficient way of doing this?
+
2.) The only way I can think of how to do this (without decompiling the first map of Portal itself) is to set a '''logic_timer''' to increase the value of a '''math_counter''' for each pair of numbers, which would be 1 time per second for the seconds space, 60 times (!) per second for the centiseconds space, and something like 10 times per second for the  milliseconds space (this texture has 10 blurred frames).  So this amounts to 71 times per second that a logic_timer will change the value of a math_counter, and then the math_counter changes the texture index of the clock number textures.  Is there a more efficient way of doing this? --[[user:volt|volt]], a while ago
 +
 
 +
2.a) There is a texture that has the countdown in it. I am unsure how to make the texture start counting down, but it has a exclamation icon beside it, so maybe theres a way to start it. Texture is signage/clock_...  ---- SBrown
 +
 
 +
==Example Map==
 +
[http://files.filefront.com/timerexamplevmf/;9120481;/fileinfo.html Here's a timer.] Some things in there are very inefficient but I'm satisfied for now.  --[[User:Volt|volt]] 07:36, 25 Nov 2007 (PST)

Latest revision as of 22:04, 2 May 2008

I'm thinking about doing this... but before I make the page, a few things:

1.) In testchamber 00, the clock above both portals is in the format minutes : seconds : centiseconds : milliseconds. But the centiseconds only counts down from 59 to 0, which makes no sense. There are 100 centiseconds in a second.

2.) The only way I can think of how to do this (without decompiling the first map of Portal itself) is to set a logic_timer to increase the value of a math_counter for each pair of numbers, which would be 1 time per second for the seconds space, 60 times (!) per second for the centiseconds space, and something like 10 times per second for the milliseconds space (this texture has 10 blurred frames). So this amounts to 71 times per second that a logic_timer will change the value of a math_counter, and then the math_counter changes the texture index of the clock number textures. Is there a more efficient way of doing this? --volt, a while ago

2.a) There is a texture that has the countdown in it. I am unsure how to make the texture start counting down, but it has a exclamation icon beside it, so maybe theres a way to start it. Texture is signage/clock_... ---- SBrown

Example Map

Here's a timer. Some things in there are very inefficient but I'm satisfied for now. --volt 07:36, 25 Nov 2007 (PST)