Difference between revisions of "Lua:Flags"
From Fortress Forever Wiki
Jump to navigationJump to searchSqueek-10494 (talk | contribs) |
Squeek-10494 (talk | contribs) |
||
Line 35: | Line 35: | ||
local grenade = CastToGrenade( explode_entity ) | local grenade = CastToGrenade( explode_entity ) | ||
if grenade:Type() == Grenade.kNormal then | if grenade:Type() == Grenade.kNormal then | ||
+ | ... | ||
+ | end | ||
+ | </pre></code> | ||
+ | }} | ||
+ | |||
+ | {{Lua:FlagType | ||
+ | |prefix=Damage | ||
+ | |usage=Returns a specific damage type's ID; predominately used to detect fall damage | ||
+ | |flags= | ||
+ | {{Lua:Flag|Damage.kGeneric|Generic damage}} | ||
+ | {{Lua:Flag|Damage.kCrush|Crushing damage (as in by an elevator or door)}} | ||
+ | {{Lua:Flag|Damage.kBullet|Bullet damage}} | ||
+ | {{Lua:Flag|Damage.kSlash|Unknown}} | ||
+ | {{Lua:Flag|Damage.kBurn|Burn damage (maybe by pyro, maybe by trigger_hurt)}} | ||
+ | {{Lua:Flag|Damage.kVehicle|Vehicle damage}} | ||
+ | {{Lua:Flag|Damage.kFall|Fall damage}} | ||
+ | {{Lua:Flag|Damage.kBlast|Blast damage}} | ||
+ | {{Lua:Flag|Damage.kClub|Unknown}} | ||
+ | {{Lua:Flag|Damage.kShock|Shock damage}} | ||
+ | {{Lua:Flag|Damage.kSonic|Unknown}} | ||
+ | {{Lua:Flag|Damage.kEnergyBeam|Unknown}} | ||
+ | {{Lua:Flag|Damage.kPreventPhysForce|Unknown}} | ||
+ | {{Lua:Flag|Damage.kNeverGib|Unknown}} | ||
+ | {{Lua:Flag|Damage.kAlwaysGib|Unknown}} | ||
+ | {{Lua:Flag|Damage.kDrown|Drowning damage}} | ||
+ | {{Lua:Flag|Damage.kTimeBased|Unknown}} | ||
+ | {{Lua:Flag|Damage.kParalyze|Unknown}} | ||
+ | {{Lua:Flag|Damage.kNerveGas|Unknown}} | ||
+ | {{Lua:Flag|Damage.kPoison|Unknown}} | ||
+ | {{Lua:Flag|Damage.kRadiation|Unknown}} | ||
+ | {{Lua:Flag|Damage.kDrownRecover|Unknown}} | ||
+ | {{Lua:Flag|Damage.kAcid|Unknown}} | ||
+ | {{Lua:Flag|Damage.kSlowBurn|Unknown}} | ||
+ | {{Lua:Flag|Damage.kRemoveNoRagdoll|Unknown}} | ||
+ | {{Lua:Flag|Damage.kPhysgun|Unknown; likely not applicable}} | ||
+ | {{Lua:Flag|Damage.kPlasma|Unknown}} | ||
+ | {{Lua:Flag|Damage.kAirboat|Likely not applicable}} | ||
+ | {{Lua:Flag|Damage.kDissolve|Can be dealt by a trigger_hurt}} | ||
+ | {{Lua:Flag|Damage.kBlastSurface|Unknown}} | ||
+ | {{Lua:Flag|Damage.kDirect|Unknown}} | ||
+ | {{Lua:Flag|Damage.kBuckshot|Unknown}} | ||
+ | {{Lua:Flag|Damage.kGibCorpse|Unknown}} | ||
+ | {{Lua:Flag|Damage.kShownHud|Unknown}} | ||
+ | {{Lua:Flag|Damage.kNoPhysForce|Unknown}} | ||
+ | |example= | ||
+ | <code><pre> | ||
+ | local damagetype = damageinfo:GetDamageType() | ||
+ | if damagetype == Damage.kFall then | ||
... | ... | ||
end | end |
Revision as of 18:19, 18 December 2008
Team
Returns a specific team's ID
|
Example
local player = CastToPlayer( touch_entity )
if player:GetTeamId() == Team.kRed then
...
end
Grenade
Returns a specific grenade's ID
|
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
|
Example
local damagetype = damageinfo:GetDamageType()
if damagetype == Damage.kFall then
...
end