ENT.OnRemove

From GMod Wiki

Revision as of 08:14, 11 October 2010 by Jcw87 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnRemove
SyntaxENT:OnRemove( )
DescriptionCalled right before the SENT is removed
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.OnRemove]ENT.OnRemove [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionEmits an effect when the entity is removed.
Used onNewerShared.png
Code
function ENT:OnRemove( )
	local effectdata = EffectData()
		effectdata:SetOrigin( self:GetPos() )
		effectdata:SetScale( 1 )
		effectdata:SetMagnitude( 1 )
	util.Effect( "GlassImpact", effectdata, true, true )
end
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox