Entity:SetNetworkKeyValue
Description
A helper function to allow setting Network Variables via Entity:SetKeyValue, primarily to allow mappers to set them from Hammer.
Meant to be called from ENTITY:KeyValue, see example.
See also Entity:SetNetworkVarsFromMapInput for a function that does similar thing for map inputs instead.
This function will only work on entities which had Entity:InstallDataTable called on them, which is done automatically for players and all Scripted Entities.
Arguments
Returns
Example
Example usage, adding this will allow mappers to set all your key networks as key values. You will also need to provide manually crafted .fgd
file that lists all the key values. env_skypaint
can be used as an example (garrysmod.fgd
and env_skypaint.lua
in base gamemode).