Difference between revisions of "Lua:Flags"

From Fortress Forever Wiki
Jump to navigationJump to search
m (Lua Flags moved to Lua:Flags: Namespace)
Line 39: Line 39:
 
</pre></code>
 
</pre></code>
 
}}
 
}}
 +
 +
[[Category:Lua]]

Revision as of 20:09, 25 February 2008

Team

Returns a specific team's ID

Flag Description
Team.kUnassigned The Unassigned team consists of players that have not picked a team)
Team.kSpectator Spectators
Team.kRed The Red team
Team.kBlue The Blue team
Team.kYellow The Yellow team
Team.kGreen The Green team

Example

local player = CastToPlayer( touch_entity ) 
if player:GetTeamId() == Team.kRed then
  ...
end

Grenade

Returns a specific grenade's ID

Flag Description
Grenade.kNormal Frag grenade (All classes except Scout and Civilian)
Grenade.kCaltrop Caltrop grenades are no longer in the game
Grenade.kNail Nail Grenade (Soldier)
Grenade.kMirv Mirv grenade (HWGuy and Demoman)
Grenade.kMirvlet The four mini-grenades that come out of the Mirv grenade (HWGuy and Demoman)
Grenade.kConc Concussion grenade (Scout and Medic)
Grenade.kNapalm Napalm grenade (Pyro)
Grenade.kGas Gas grenade (Spy)
Grenade.kEmp EMP grenade (Engineer)

Example

local grenade = CastToPlayer( explode_entity ) 
if grenade:Type() == Grenade.kNormal then
  ...
end