...what's wrong this time?

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • The bottom code is the code I just added, for some reason it spawns one less copy of the first object picked, but only if more than one object is being spawned (if it's just the one card it still spawns it). I've tried adding a delay and it does the same thing. I went into debug to confirm it wasn't the sorter being dumb and overlapping stuff, can confirm, it spawns one less. Not really sure why or how to fix it.

  • Check InDeck variable of all cards in the debugger. Maybe it's 0 for some cards.

    As I mentioned before, referencing cards by UID in the dictionary is a bad idea. Their UIDs may change if you switch to another layout, or restart the layout.

  • Check InDeck variable of all cards in the debugger. Maybe it's 0 for some cards.

    As I mentioned before, referencing cards by UID in the dictionary is a bad idea. Their UIDs may change if you switch to another layout, or restart the layout.

    it's not 0, it's showing the correct number in deck, it's just spawning 1 less of the first card picked. like if there's two, three, or four, it still spawns some, just one less than it's supposed to for specifically the first card. And also only if more than one card spawns, if it's just the one it spawns perfectly fine. Also, I tried switching it to be set by an instance variable attached to the cards and that didn't remotely work. Dictionary.get(str(Cards.InDeck))

  • Without the rest of your project it's impossible to help you.

    Test with only 1 or 2 cards, run in debug mode, check all instances, variables and the contents of the dictionary. And you will probably figure it out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without the rest of your project it's impossible to help you.

    Test with only 1 or 2 cards, run in debug mode, check all instances, variables and the contents of the dictionary. And you will probably figure it out.

    No you're correct, you're good with this stuff so I knew that if you couldn't tell by looking at the code of them spawning, then it was something else entirely. Since they spawn in at a larger size for a fraction of a second, they spawn in overlapping something that I gave different properties to for overlapping cards. I can't believe I didn't think about that, sorry.

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