Revision Difference
Entity:SetSaveValue#514453
<function name="SetSaveValue" parent="Entity" type="classfunc">⤶
<description>⤶
Sets a save value for an entity.⤶
⤶
<bug issue="4065">This does not type-check entity keys. Setting an entity key to a non-entity value will treat it as NULL.</bug>⤶
</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="name" type="string">Name of the save value to set</arg>⤶
<arg name="value" type="any">Value to set</arg>⤶
</args>⤶
<rets>⤶
<ret name="" type="boolean">Key successfully set</ret>⤶
</rets>⤶
</function>⤶
⤶
<example>⤶
<description>Make all rollermines currently on the map friendly</description>⤶
<code>⤶
for k, v in pairs( ents.FindByClass( "npc_rollermine" ) ) do⤶
v:SetSaveValue( "m_bHackedByAlyx", true )⤶
end⤶
</code>⤶
⤶
</example>