Loop Array?

0 favourites
  • 7 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies. For use in game and custom works.
  • Array 0.1 1.2 2.3 3.4 4.5 5.6 6.7 7.8

    8 sprites in total

    4 sprites with var = 1

    4 sprites with var = 2

    For sprites with var = 1 pick by UID ascending set animation to (Array from 0 to 3)

    For sprites with var = 2 pick by UID ascending set animation to (Array from 4 to 7)

    In real time i have 32 cards for 4 players (8 each player) and i have to change their variables to make the deal realistic depend of the dealer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Where's the question?

  • Where's the question?


    Its something like i want to take the third and fourth sprites according their uid and set their animations to the first and second value of the array.

  • Still is a bit not clear what you trying to do

    Are you trying to pick 8 random cards for each player?

  • Are you trying to pick 8 random cards for each player?



    Card game with 4 players , 8 cards each player.

    When the dealer is player1 he deal the cards like-> 3 for player2 "pause" 3 for player3 "pause" 3 for player4 "pause" 3 for him.After that he continue deal 2 cards for each player like before and after another 3 cards.

    Right now i have an array setup like

    with this array i give to each card a value and after i start a timer depend on this value and i have the result.

    Now, this is ok if the dealer is player4 and the first player who receive cards is the player1 because i set the value of the timer like

    But if i change the dealer to player1 then the first 3 values must go to the cards of player2.

    Right now i do the job by changing the array manually but im looking an easy way.

  • Hi savvito123 Thanks for the explanation

    After read many times this is what I understood, it may be wrong though

    Say you have an Array Width = 32 >>>> that is 8 x 4 =32 cards

    For what I see you have some values stored for the Cards (Var = Time) and roughly it goes from value 0.2 which is stored in Array index = 0 up to the last index on increments of 0.2 roughly (I know you have different Values there but this is just for simplicity, you can change to your values later)


    Index = 0 >>> 0.2

    Index = 1 >>> 0.4

    Index = 2 >>> 0.6

    Index = 3 >>> 0.8

    Index = 4>>> 1

    Index = 5 >>> 1.2


    Now if the Player dealing is = Player 4

    The first player to get the Time is = Player 1



    Player 1

    Card1 = 0.2

    Card2 = 0.4

    Card3 = 0.6

    Player 2

    Card1 = 0.8

    Card2 = 1

    Card3 = 1.2



    Player 1

    Card4 = 2.6

    Card5 = 2.8

    Player 2

    Card4 = 3

    Card5 = 3.2


    If this is correct I made a demo for you, if it's not what you need just tell me what is missing or what needs to be change


  • Hey tarek2

    Thank you very much for all that.

    I really appreciate your help,

    well this is perfect for me and i will insert it to my project.

    Thank you very much.

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