• Question about Data Tables
    2 replies, posted
Currently, I have an entity derived from base with two data tables (two bools). I have additional entities that are also derived from that entity base, which do not have data tables on them (do not need), and currently I want to add a data table for any entities in the base... but [lua]function ENT:SetupDataTables() self:NetworkVar("Bool", 0, "BoolA") self:NetworkVar("Bool", 1, "BoolB") end[/lua] How would I setup an additional integer without conflicting with the bools from the other entities?
Bump. Anybody know?
[QUOTE=Lerpaderp;39713932] [lua]function ENT:SetupDataTables() self:NetworkVar("Bool", 0, "BoolA") self:NetworkVar("Bool", 1, "BoolB") end[/lua] How would I setup an additional integer without conflicting with the bools from the other entities?[/QUOTE] You can have 4 of each type, just re-use your number and change the type. [lua]function ENT:SetupDataTables() self:NetworkVar("bool", 0, "BoolA") self:NetworkVar("bool", 1, "BoolB") self:NetworkVar("int", 0, "IntA") self:NetworkVar("int", 1, "IntB") self:NetworkVar("int", 2, "IntC") self:NetworkVar("float", 0, "FloatA") end[/lua]
Sorry, you need to Log In to post a reply to this thread.