Creates a network variable on the entity and adds Set/Get functions for it. This function should only be called in ENTITY:SetupDataTables.
See Entity:NetworkVarNotify for a function to hook NetworkVar changes.
Int(32-bit signed integer)
0, a bool in slot
0and a float in slot
0etc. You can't have two ints in slot
0, instead you would do a int in slot
0and another int in slot
The max slots right now are
32 - so you should pick a number between
31. An exception to this is strings which has a max slots of
Fooyou would add two new functions on your entity -
GetFoo(). So be careful that what you call it won't collide with any existing functions (don't call it
- Allows the NetworkVar to be set using Entity:SetKeyValue. This is useful if you're making an entity that you want to be loaded in a map. The sky entity uses this.
- The edit key lets you mark this variable as editable. See Editable Entities for more information.
Setting up data tables