Solved Create rounds..

Discussion in 'Spigot Plugin Development' started by Giorgino, Jan 24, 2020.

  1. Hello everyone, by chance does anyone know how I can create rounds for a minigame? For example, instead of finishing the game another round will start within the game.
  2. That is a very general question... Could you narrow it down? What code do you have so far for starting/ending your minigame?
    • Useful Useful x 1
  3. My question is how can I create rounds within games. For example round 1, after round 2 up to a limit ..
  4. do you want a whole project typed out to demonstrate it to you? this isnt a small or simple question. theres a lot you have to do regarding oop to design a round system
  5. Well you see, there are many ways to do such a thing. You could for example just load it again with different attributes, you could have a completely separate bit of code, you could also add a game manager which keeps track of the round and will end/load stages, etc. Could you maybe show what you have now for loading your game?
    • Useful Useful x 1
  6. Explaining it is very difficult..
  7. You could create a method in which the content of the round and a boolean that by default is false, for example:
    Code (Text):

    public void MiniGame () {
    // Content of the minigame ();
    boolean RoundHasEnd = false;
    then once the round is over, set the boolean to true, then make an int containing the number of rounds completed, and once the first round is finished set the boolean to true and do a
    Code (Text):
     if (RoundHasEnd) {
    int rounds ++;
    // increase the int by 1
    then once round 2 begins set the boolean to false and start the MiniGame () method again, finally an if (rounds> = Number of Permitted Rounds) {
    player.teleport (lobby)
    and then restart the server (optional () must have a method which rerun the MiniGame method)
    • Winner Winner x 1