KcdMp.state
The bags - global, per player, per entity - as tables of strings.
KcdMp.state.global[key] is the world’s bag; KcdMp.state.player[pid][key] a player’s (every player’s, from the join
on; the client’s own pid is KcdMp.player_id); KcdMp.state.entity[id][key] an entity’s while it is in view. A
player’s table appears with their first key and goes with their leave; read KcdMp.state.player[pid] defensively.
Syntax
Section titled “Syntax”KcdMp.stateReturns
Section titled “Returns”table - {global = {key = value}, player = {[pid] = {key = value}}, entity = {[id] = {key = value}}}
Example
Section titled “Example”local round = tonumber(KcdMp.state.global.round) or 0local mine = KcdMp.state.player[KcdMp.player_id]local team = mine and mine.teamSee also
Section titled “See also”KcdMp.on_state · KcdMp.on_state_change · KcdMp.player_id · the State bags group of the index
