Entity.SetSaveValue
From GMod Wiki
| Function | |
| Syntax | Entity.SetSaveValue( String name, Var value ) |
| Description: | |
| Sets a save value for an entity | |
| Returns: | nil |
| In Object: | Entity |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.SetSaveValue]Entity.SetSaveValue [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Make all rollermines currently on the map friendly |
|---|---|
| Used on | |
| Code | for k, v in pairs(ents.FindByClass("npc_rollermine")) do v:SetSaveValue("m_bHackedByAlyx", true) end |
| Output | none |
Additional Notes
- This function can set any value in a c++ entity that is defined with the
DEFINE_FIELDmacro.