How do I make "else" statement ?

0 favourites
  • 3 posts
  • Hi ,

    Lets assume we have 3 players, playing which each other (like soccer world cup group matches)), so every player plays once with any other.

    So with 3 players games should look like

    1 player vs 2 player

    1 player vs 3 player

    2 player vs 3 player

    3 games altogether.

    So I created 3 objects and compared their variables to decide the winner (lets say lowest wins):

    So with variables 30/20/10 it is:

    "Box 2 wins !"

    "Box 3 wins !"

    "Box 3 wins !"

    But the same with variables 3/2/1 it is:

    "Box 2 wins !"

    "Box 3 wins !"

    "Box 2 wins !"

    Where is the mistake ? In "else" statement - is it misplaced ?

    dropbox.com/s/gvhv46wjue8jawq/numbers%20compare.capx?dl=0

    Actually, this sequence is called triangular numbers (3 , 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91 so on)

  • In the "Compare parameter" condition you put the parameter index as the first value so it should be "Function: Parameter 1 <= ..." and not "Function: Parameter Self.Param(1) <= ...".

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • this way works!

    thanks ramones

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)