Entity:SetNetworkVarsFromMapInput
Recently Added
This was recently added in version (2025.03.18). It might only be available on the Dev Branch right now.
Description
A helper function to allow setting Network Variables via Entity:Fire, primarily to allow mappers to set them from Hammer via Map I/O logic.
Meant to be called from ENTITY:AcceptInput, see example.
See also Entity:SetNetworkKeyValue for a function that does similar thing, but for entity key-values in Hammer 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 networks vars using Map I/O inputs. 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).