duplicator.DoGeneric

From GMod Wiki

Revision as of 06:09, 24 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Warning 64.pngThis page needs to be edited as it contains information that is unclear or incorrect. Improvement can be discussed on the talk page. Find more pages that need work here.
Details: None given.
Function
Syntax duplicator.DoGeneric( Entity entity, Table data )
Where is this used?
Description:
Applies generic every-day entity stuff for ent from table data.
Returns: nil
Part of Library: duplicator
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Duplicator.DoGeneric]Duplicator.DoGeneric [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSets the model, position and angle of the entity.
Used onNewerServer.png
Code
 
local lamp = ents.Create( "gmod_light" ) 
 
        if (!lamp:IsValid()) then return end 
 
        duplicator.DoGeneric( lamp, Data ) 
        lamp:SetLightColor( r, g, b ) 
        lamp:SetBrightness( brght ) 
        lamp:SetLightSize( size ) 
 
lamp:Spawn() 
 
duplicator.DoGenericPhysics( lamp, pl, Data )
OutputN/A


Additional Notes

 
 table.Model   //See ent:SetModel()
 table.Pos     //See ent:SetPos()
 table.Angle   //See ent:SetAngles()
 

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox