Difference between revisions of "014E"
(Created page with '{{OpCode | ini = 014E=1,%1d% (III), 014E=2,%1d% %2d% (VC, SA) | description = Displays a timer | p1 = Global variable, that contains time in miliseconds | p2 …') |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | { | + | <div class="thumb tright"><div class="thumbinner" style="width:304px;"> |
− | | | + | {| cellspacing="0" |
− | | | + | |- |
− | | | + | | class="thumbimage" | [[File:III 014E.png|300px]] |
− | | | + | |- |
− | | | + | | style="padding: 0;" | <div class="thumbcaption">014E in action in GTA III.</div> |
− | + | |- | |
+ | | class="thumbimage" | [[File:VC 014E.png|300px]] | ||
+ | |- | ||
+ | | style="padding: 0;" | <div class="thumbcaption">014E in action in Vice City.</div> | ||
+ | |} | ||
+ | </div></div> | ||
+ | {{Icon|trilogy}} '''DISPLAY_<wbr>ONSCREEN_<wbr>TIMER''' | ||
+ | <hr /> | ||
+ | '''Description''' | ||
+ | : Displays an onscreen timer | ||
+ | '''Syntax''' | ||
+ | : {{Icon|3}} 014E: set_timer_to [''global var''] | ||
+ | : {{Icon|VC}} {{Icon|SA}} 014E: set_timer_to [''global var''] type [''int''] | ||
+ | '''Parameter''' | ||
+ | : [''global var''] | ||
+ | :: Global variable containing the time in milliseconds | ||
+ | : [''int''] | ||
+ | :: Timer direction (see below) | ||
− | This | + | This opcode displays an onscreen timer. In GTA III the timer only counts down but since Vice City timers can also count up. You must use a global variable. Using an integer constant crashes the game and a local variable produces no timer. The value of the global variable is stored in milliseconds but the format of the display is MM:SS. The value of the global variable will be constantly updated by the timer and the timer itself can be updated by assigning a value to the global variable. When counting down, at 10 seconds the timer will produce a noise every second, specifically [[SFX]] 336 for GTA III and 370 for Vice City. Once the timer finishes counting down, it will be cleared from the screen. Only one timer can be displayed at a time. Attempting to display another timer while the current timer is in effect will not produce an additional timer. Due to the limitation of the format of the timer, the timer will not display properly above 99:99 but will still keep accurate count. In GTA III and Vice City, [[02A3|switching widescreen on]] will hide the timer from view. In Vice City, it will also mute the 10-second countdown noise. |
− | [[ | + | {| class="wikitable" |
− | + | ! Direction || [[SCM language III/VC definitions#TIMER|Enum]] | |
− | + | |- | |
− | + | | 0 || TIMER_UP | |
+ | |- | ||
+ | | 1 || TIMER_DOWN | ||
+ | |} | ||
− | ==Keywords== | + | == Keywords == |
− | timer | + | set, display, onscreen, timer, countdown |
+ | |||
+ | == See also == | ||
+ | * [[014F]], clears onscreen timer | ||
+ | * [[0396]], freezes onscreen timer | ||
+ | * [[03C3]], displays timer with string | ||
+ | |||
+ | [[Category:OpCodes]] |
Latest revision as of 04:45, 9 June 2015
Description
- Displays an onscreen timer
Syntax
Parameter
- [global var]
- Global variable containing the time in milliseconds
- [int]
- Timer direction (see below)
This opcode displays an onscreen timer. In GTA III the timer only counts down but since Vice City timers can also count up. You must use a global variable. Using an integer constant crashes the game and a local variable produces no timer. The value of the global variable is stored in milliseconds but the format of the display is MM:SS. The value of the global variable will be constantly updated by the timer and the timer itself can be updated by assigning a value to the global variable. When counting down, at 10 seconds the timer will produce a noise every second, specifically SFX 336 for GTA III and 370 for Vice City. Once the timer finishes counting down, it will be cleared from the screen. Only one timer can be displayed at a time. Attempting to display another timer while the current timer is in effect will not produce an additional timer. Due to the limitation of the format of the timer, the timer will not display properly above 99:99 but will still keep accurate count. In GTA III and Vice City, switching widescreen on will hide the timer from view. In Vice City, it will also mute the 10-second countdown noise.
Direction | Enum |
---|---|
0 | TIMER_UP |
1 | TIMER_DOWN |
Keywords
set, display, onscreen, timer, countdown