Lua:UpdateObjectiveIcon

From Fortress Forever Wiki
Revision as of 21:02, 11 May 2009 by Crazycarl (talk | contribs) (New page: {{Infobox manual/Header}} ==UpdateObjectiveIcon== Set the objective icon for a single player. ===Usage=== <pre>UpdateObjectiveIcon(player, entity)</pre> ===Input=== player(CFFPlayer) Th...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


UpdateObjectiveIcon

Set the objective icon for a single player.

Usage

UpdateObjectiveIcon(player, entity)

Input

player(CFFPlayer) The player who will see the objective. entity(CBaseEntity) The entity that will be the objective. Could be a flag, player, or trigger. Use nil to remove the objective.

Output

Returns: nothing

Example

local player = CastToPlayer( player_entity )
--set the player's objective to a cap point
UpdateObjectiveIcon( player, GetEntityByName( team.."_cap" ) )
--clear it after a cap
UpdateObjectiveIcon( player, nil )