ENT.OnRemove

From GMod Wiki

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