duplicator.DoGeneric

From GMod Wiki

Jump to: navigation, search
This 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
Available On:
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 on
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 )
OutputNone.


Additional Notes

  • The table has 3 values:
 
 table.Model   //See ent:SetModel()
 table.Pos     //See ent:SetPos()
 table.Angle   //See ent:SetAngles()
 

See Also

Personal tools