Entity.HasSpawnFlags

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:HasSpawnFlags( Integer )
Description:
Returns true if the specified spawnflag is part of that entities's spawnflags.
Returns: Boolean
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.HasSpawnFlags]Entity.HasSpawnFlags [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSetting a couple of spawn flags on an explosion then checking which ones are true.
Used onNewerServer.png
Code
exp = ents.Create( "env_explosion" )
exp:SetKeyValue( "spawnflags", 952)
print( exp:HasSpawnFlags(2), exp:HasSpawnFlags(16), exp:HasSpawnFlags(64), exp:HasSpawnFlags(128), exp:HasSpawnFlags(512) )
Outputfalse true false true true


Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox