Difference between revisions of "Lua:AddHudTimerToTeam"

From Fortress Forever Wiki
Jump to navigationJump to search
m (2.42)
 
m
Line 31: Line 31:
  
 
==Note==
 
==Note==
The timer is strictly a visual aid. To time actual game events, Use the [[:Category:Schedules|Scheduling System]] or [[Lua:Timers]]
+
The timer is strictly a visual aid. To time actual game events, Use the [[:Category:Schedules|Scheduling System]] or [[Lua:Timer]]
  
 
[[Category:HUD_Items]]
 
[[Category:HUD_Items]]
 
{{Infobox manual/Footer}}
 
{{Infobox manual/Footer}}

Revision as of 20:10, 25 June 2011


Mapping for FF
The Basics

Setting up Hammer
Getting Started With Lua
Releasing a map

FF-specific Entities

Lua location system

Map Templates
FF Lua Documentation

Entity Typing
Entity Collections

Commands
Callbacks

AddHudTimer

Puts a countdown timer on a player's screen.

Usage

AddHudTimerToTeam( team, huditemname, timername, x, y )
AddHudTimerToTeam( team, huditemname, timername, x, y, align )
AddHudTimerToTeam( team, huditemname, timername, x, y, alignx, aligny )

Input

  • team(CFFTeam) A reference to the team receiving the timer
  • huditemname(string) the name of this timer (so we can remove it later)
  • timername(string) the name of a Lua:Timer object
  • x(integer) horizontal position
  • y(integer) vertical position
  • align(integer) x alignment options:
    • 0: align to left
    • 1: align to right
    • 2: align to left of center
    • 3: align to right of center

Output

Returns noting

Example

local player = CastToPlayer( player_entity )
AddHudTimer(player, "timer", 300, -1, 0, 70, 4)

Note

The timer is strictly a visual aid. To time actual game events, Use the Scheduling System or Lua:Timer