Revision Difference
Entity:CallDTVarProxies#547713
<function name="CallDTVarProxies" parent="Entity" type="classfunc">⤶
<description>Calls all NetworkVarNotify functions with the given new value, but doesn't change the real value.</description>⤶
<realm>Shared</realm>⤶
<file line="282-L289">lua/includes/extensions/entity.lua</file>⤶
<args>⤶
<arg name="Type" type="string">The NetworkVar Type.⤶
* `String`⤶
* `Bool`⤶
* `Float`⤶
* `Int` (32-bit signed integer)⤶
* `Vector`⤶
* `Angle`⤶
* `Entity`</arg>⤶
<arg name="index" type="number">The NetworkVar index.</arg>⤶
<arg name="new value" type="any">The new value.</arg>⤶
</args>⤶
</function>⤶
⤶
<example>⤶
<description>Calls the NetworkVarNotify function with the given new value but doesn't changes the real value.</description>⤶
<code>⤶
Entity(1):NetworkVar("String", 0, "Example")⤶
Entity(1):SetExample("hello")⤶
Entity(1):NetworkVarNotify("Example", function(ent, var, old, new) print(ent, var, old, new) end)⤶
Entity(1):CallDTVarProxies("String", 0, "world")⤶
print("Value:" .. Entity(1):GetExample())⤶
</code>⤶
<output>Player [1][Raphael] Example hello world ⤶
Value: hello</output>⤶
</example>