• Simple Rounds?
    7 replies, posted
Hello, I was wondering if there was a simple way of making rounds for gamemodes without using the Fretta base. What I've got so far is 4 global variables, like so: [lua] SetGlobalVar("ROUND_STATE", nil) SetGlobalVar("ROUND_PREPARE", 0) SetGlobalVar("ROUND_PLAY", 1) SetGlobalVar("ROUND_WAIT", 2) [/lua] Then, I've got functions hooked onto events (like the necessary amount of players needed to be in the server for a round to start) in which the ROUND_STATE is changed to one of those values. And then I've got functions for each of those ROUND_ variables, in which the round takes place and actions happen, etc. I was just wondering, is there a more simple way of doing rounds? Or is this generally how I should go about doing it?
I don't see a problem with that, it's how TTT does it and it's easy to use in scripting.
I was always wondering how to make a round system. [editline]2nd June 2013[/editline] Well not just round system but that one aswell.
You don't need to use SetGlobalVar unless it changes. Just make a variable in shared.lua
[QUOTE=bobbleheadbob;40872039]You don't need to use SetGlobalVar unless it changes. Just make a variable in shared.lua[/QUOTE] It does change, from ROUND_PREPARE to ROUND_PLAY to ROUND_WAIT and so on. (0, 1, and 2 respectively.)
@LilSumac, You only need the variable for ROUND_STATE since only that changes. ROUND_STATE = 0, 1 or 2 depending on state.
[QUOTE=superdodo12;40872579]@LilSumac, You only need the variable for ROUND_STATE since only that changes. ROUND_STATE = 0, 1 or 2 depending on state.[/QUOTE] And you can use ROUND_PREPARE = 0, ROUND_PLAY = 1, ROUND_WAIT = 2 in the place of those numbers.
[QUOTE=bobbleheadbob;40872798]And you can use ROUND_PREPARE = 0, ROUND_PLAY = 1, ROUND_WAIT = 2 in the place of those numbers.[/QUOTE] Exactly. I know I don't have to assign them variables, but I do so just so I don't have to remember the exact integer values. I do the same with teams too, like TEAM_WANKS = 3 ... team.SetUp(TEAM_WANKS, etc etc). Just makes things easier to keep track of, IMO. Anyway, thanks for the help.
Sorry, you need to Log In to post a reply to this thread.