1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Making a minigame rounds

Discussion in 'Development' started by Mystic30, Oct 8, 2017.

  1. Mystic30

    Mystic30 Witch

    Messages:
    52
    GitHub:
    Mystic30
    I'd like to make my minigame rounds
    example: when blue team won the 1st round, the game will continue to 13th rounds, the more scores is the winner . just like Counter Strike hehe
     
  2. themestl

    themestl Spider Jockey

    Messages:
    39
    GitHub:
    themestl
    Like this?
    PHP:
    private $wons = ['red' => 0'blue' => 0'continue' => 10];

    public function 
    onWin(string $team){
       
    $this->wons[$team]++;
       if(
    $this->wons[$team] >= $this->wons['continue']){
          
    //TODO you must stop the game. 
       
    }
    }
     
    MasterPE and Mystic30 like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.