From Fortress Forever Wiki
Jump to: navigation, search

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



Adds an icon to a player's screen


AddHudIcon(player, material, icon_id, x, y, w, h, align)


Returns: nothing


  • player(CFFPlayer) A reference to the player receiving the icon
  • material(string) the name of a vmt file to serve as the icon. This string must end in .vtf--however it is actually looking up a vmt file. This .vmt must be located in FortressForever\materials\vgui\.
  • icon_id(string) a name for this icon (so we can remove it later)
  • x(integer) horizontal position
  • y(integer) vertical position
  • w(integer) width of the icon
  • h(integer) height of the icon
  • 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


local player = CastToPlayer( player_entity )
AddHudIcon(player, "minimap.vtf", "mapoverlay", 0, 40, 128, 128, 1 )