Entity.IsEffectActive

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:IsEffectActive( Enum effect )
Description:
Returns if a engine effect is active on the entity.
Returns: Boolean
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.IsEffectActive]Entity.IsEffectActive [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionChecks if the blink effect is active.
Used onNewerShared.png
Code
 
local active = Entity:IsEffectActive(EF_ITEM_BLINK);
print(active);
 
Outputtrue/false
DescriptionCreates a Entity.GetNoDraw function for all entities.
Used onNewerShared.png
Code
 
function _R.Entity:GetNoDraw() -- _R.Entity is the same as FindMetaTable("Entity")
 
    return self:IsEffectActive( EF_NODRAW );
 
end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox