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

From Valve Developer Community
Jump to: navigation, search
Line 5: Line 5:
 
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.) 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
  
 +
==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)
 
[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)

Revision as of 15:36, 25 November 2007

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

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)