Difference between revisions of "Lua:AddHudTimer"
From Fortress Forever Wiki
Jump to navigationJump to searchm (2.42) |
m (2.42) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Infobox manual/Header}} | {{Infobox manual/Header}} | ||
+ | {{Infobox_mapping}} | ||
==AddHudTimer== | ==AddHudTimer== | ||
Line 5: | Line 6: | ||
===Usage=== | ===Usage=== | ||
− | <pre>AddHudTimer( player, huditemname, timername, x, y ) | + | <pre> |
+ | AddHudTimer(player, huditemname, timer, interval, x, y, align) | ||
+ | |||
+ | AddHudTimer( player, huditemname, timername, x, y ) | ||
AddHudTimer( player, huditemname, timername, x, y, align ) | AddHudTimer( player, huditemname, timername, x, y, align ) | ||
AddHudTimer( player, huditemname, timername, x, y, alignx, aligny )</pre> | AddHudTimer( player, huditemname, timername, x, y, alignx, aligny )</pre> | ||
Line 11: | Line 15: | ||
===Input=== | ===Input=== | ||
* player(CFFPlayer) A reference to the player receiving the timer | * player(CFFPlayer) A reference to the player receiving the timer | ||
− | * | + | * huditemname(string) the name of this timer (so we can remove it later) |
− | * timer(integer | + | |
− | * interval(integer | + | * timer(integer) the inital number of seconds on the timer |
+ | * interval(integer) amount of time to add to the timer per second | ||
+ | OR: | ||
+ | * timername(string) the name of a [[Lua:Timer]] object | ||
+ | |||
* x(integer) horizontal position | * x(integer) horizontal position | ||
* y(integer) vertical position | * y(integer) vertical position | ||
Line 31: | Line 39: | ||
==Note== | ==Note== | ||
− | The timer is strictly a visual aid. To time actual game events, Use the [[:Category:Schedules|Scheduling System | + | The timer is strictly a visual aid. To time actual game events, Use the [[:Category:Schedules|Scheduling System]] |
[[Category:HUD_Items]] | [[Category:HUD_Items]] | ||
{{Infobox manual/Footer}} | {{Infobox manual/Footer}} |
Latest revision as of 21:17, 25 June 2011
AddHudTimerPuts a countdown timer on a player's screen. UsageAddHudTimer(player, huditemname, timer, interval, x, y, align) AddHudTimer( player, huditemname, timername, x, y ) AddHudTimer( player, huditemname, timername, x, y, align ) AddHudTimer( player, huditemname, timername, x, y, alignx, aligny ) Input
OR:
OutputReturns noting Examplelocal player = CastToPlayer( player_entity ) AddHudTimer(player, "timer", 300, -1, 0, 70, 4) NoteThe timer is strictly a visual aid. To time actual game events, Use the Scheduling System |