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 = CastToGrenade( explode_entity )
if grenade:Type() == Grenade.kNormal then
...
end
Damage
Returns a specific damage type's ID; predominately used to detect fall damage
Flag
|
Description
|
Damage.kGeneric
|
Generic damage
|
Damage.kCrush
|
Crushing damage (as in by an elevator or door)
|
Damage.kBullet
|
Bullet damage
|
Damage.kSlash
|
Unknown
|
Damage.kBurn
|
Burn damage (maybe by pyro, maybe by trigger_hurt)
|
Damage.kVehicle
|
Vehicle damage
|
Damage.kFall
|
Fall damage
|
Damage.kBlast
|
Blast damage
|
Damage.kClub
|
Unknown
|
Damage.kShock
|
Shock damage
|
Damage.kSonic
|
Unknown
|
Damage.kEnergyBeam
|
Unknown
|
Damage.kPreventPhysForce
|
Unknown
|
Damage.kNeverGib
|
Unknown
|
Damage.kAlwaysGib
|
Unknown
|
Damage.kDrown
|
Drowning damage
|
Damage.kTimeBased
|
Unknown
|
Damage.kParalyze
|
Unknown
|
Damage.kNerveGas
|
Unknown
|
Damage.kPoison
|
Unknown
|
Damage.kRadiation
|
Unknown
|
Damage.kDrownRecover
|
Unknown
|
Damage.kAcid
|
Unknown
|
Damage.kSlowBurn
|
Unknown
|
Damage.kRemoveNoRagdoll
|
Unknown
|
Damage.kPhysgun
|
Unknown; likely not applicable
|
Damage.kPlasma
|
Unknown
|
Damage.kAirboat
|
Likely not applicable
|
Damage.kDissolve
|
Can be dealt by a trigger_hurt
|
Damage.kBlastSurface
|
Unknown
|
Damage.kDirect
|
Unknown
|
Damage.kBuckshot
|
Unknown
|
Damage.kGibCorpse
|
Unknown
|
Damage.kShownHud
|
Unknown
|
Damage.kNoPhysForce
|
Unknown
|
|
Example
local damagetype = damageinfo:GetDamageType()
if damagetype == Damage.kFall then
...
end
Ammo
Returns a specific ammo type's ID; predominately used to add or remove ammo from a player
Example
local player = CastToPlayer( player_entity )
player:AddAmmo( Ammo.kNails, 400 )
player:AddAmmo( Ammo.kShells, 400 )
player:AddAmmo( Ammo.kRockets, 400 )
player:AddAmmo( Ammo.kCells, 400 )
player:AddAmmo( Ammo.kDetpack, 1 )
player:AddAmmo( Ammo.kManCannon, 1 )