Appearance
K.Rounds
Functions
K.Rounds.Define
lua
K.Rounds.Define(config: { [string]: any })Sets up the round loop and starts it. Call it once.
K.Rounds.State
lua
K.Rounds.State(): string"Waiting", "Intermission", "Playing" or "Ending".
K.Rounds.TimeLeft
lua
K.Rounds.TimeLeft(): numberSeconds left in the countdown or the round (0 while waiting for players).
K.Rounds.Map
lua
K.Rounds.Map(): string?The name of the current map, if the round has one.
K.Rounds.IsAlive
lua
K.Rounds.IsAlive(player: Player?): booleanTrue while the player is still in the current round. Client: defaults to yourself.
K.Rounds.OnStateChanged
lua
K.Rounds.OnStateChanged(callback: (string) -> ())Runs callback(state) whenever the state changes.
K.Rounds.Current
lua
K.Rounds.Current(): Round?The round being played, or nil.
K.Rounds.Alive
lua
K.Rounds.Alive(): { Player }The players still in the current round.
K.Rounds.Eliminate
lua
K.Rounds.Eliminate(player: Player): booleanK.Rounds.AddScore
lua
K.Rounds.AddScore(player: Player, amount: number?): booleanAdds to the player's score this round, and to their team's. Returns false when no round is being played or they aren't in it.
K.Rounds.Score
lua
K.Rounds.Score(player: Player?): numberThe player's score this round. Client: defaults to yourself.
K.Rounds.End
lua
K.Rounds.End(winners: any): booleanEnds the round now. Winners: nil (nobody), a list of players, or a team name.
Events
K.Rounds.StateChanged
Server: fire for the game set up with K.Rounds.Define.
K.Rounds.Started
K.Rounds.Ended
K.Rounds.Eliminated
Generated from
src/Corode/Rounds.luau.
