CEffectData.GetEntity

From GMod Wiki

Revision as of 19:58, 13 January 2010 by CowThing (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax EffectData:GetEntity( )
Description:
Returns the entity associated with this effect.
Returns: Entity
In Object: CEffectData
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CEffectData.GetEntity]CEffectData.GetEntity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionThis will get the entity associated with the effectdata we just created.
Used onNewerShared.png
Code
 
local effectdata = EffectData()
local ent = ents.Create("prop_physics")
ent:SetModel( "models/props_junk/bicycle01a.mdl" )
ent:SetPos(Vector(0,0,0))
ent:Spawn()
effectdata:SetEntity( ent )
print("",effectdata:GetEntity())
OutputThis will print the entity associated with the effectdata in this case the bicycle at 0,0,0 (ent)


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox