Entity.SetTable
From GMod Wiki
Revision as of 05:39, 30 October 2009 by Crazy Quebecer (Talk | contribs)
Function | |
Syntax | Entity:SetTable( Table table ) |
Description: | |
Allows you to set an entity's table to an existing table. This should not be called on scripted entities, as their methods are stored in the entity's table. | |
Returns: | nil |
In Object: | Entity |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.SetTable]Entity.SetTable [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Give an entity a table describing it. |
---|---|
Used on | |
Code | function giveEntTable(ent) local myTable={} myTable["name"]="Just another entity" myTable["count"]=4 ent:SetTable(myTable) end |
Output | N/A |
Additional Notes
- Normally you wouldn't call this, since each entity has a table associated with it by default.