Possible instance variable bug or reading of....

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I am creating a blackjack game for the kids. I am trying to add instance variables of the cards to a text. Two things I am noticing are not adding up to me.

    1. The variable for a card is always read as the number 10 rather than what is in the variable

    2. I cannot get a for loop to work, or a condition for adding for each variable only once to the text

    1) Interestingly, my highest variable for any number is 10 (11 for aces) just as the game should be. So I am wondering if it has something to do with that but I start all cards off with the same frame, then update them as random cards that cover all 52 cards for each deck (just like a shuffle).

    The text I am debugging (and any text really), always shows 10 as the value, even if say....the card is a 4 with the instance variable of 4.

    2) This I can figure out somehow if not answered but...I cannot get the cards, if more than one that is causing the "trigger", to only add once per card to the total(text). I can get 1 card to add to it once and others not register, or I can get more than 1 card to keep adding and not stop.

    I am linking a video to it explaining it all. Apologies if the video is long and/or partially meaningful. I tried to make it the best I could and got confused during also.

    VIDEO

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Over 1000 events for a blackjack game argh. Share your file if you want help because it's difficult to work out what's going on from the video, but even then with so many events...

  • Please follow the bug report guidelines otherwise we cannot help. If you only need help developing your project and are not trying to report a defect in Construct, please post to one of the other forums.

  • thanks

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