Help with Looping in Construct

This forum is currently in read-only mode.
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Okay, first of all, I'm working on a card game called Tong-its. I created my own way of handling cards and I din't used the default cards plugin for reasons that I'm not exactly sure how it works and I guess it's not fully documented.

    Anyway, here's how it goes: the code

    <img src="http://img392.imageshack.us/img392/3617/97218200yd9.png">

    What it basically does is top deal cards into each player one by one..36 times...to 2 players which means each should get 12 cards and the deck will be left with 16 cards.

    the top card in the list(deck) is taken out and put to the player who should receive it

    the counting variable in the loop is the one who cycles throught the players where the card should be given..so it's basically a normal dealing of cards- turn by turn.

    The problem is that.. I don't know what the problem is..

    Because the output is:

    <img src="http://img392.imageshack.us/img392/6628/72803786sl7.png">

    When it should look like:

    <img src="http://img508.imageshack.us/img508/8295/88640956am1.png">

    The only hypotheses I got is that the Looping is not exactly working or I have misused it..It seemed to run well for the first time but it somehow fail to include in the loop the nesting if statements..In the debug, the whoseTurn had the final value 36 which is the total number of loops, however, it must have not been so because there is an if that checks the value of whoseTurn..

    Pls. take time in solving this, and I tried I really tried, and out of frusttration, i decided to post it here for some help from other users.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)