Microsoft MakeCode


Hello there! I decided to make the card game called : SkipBo
I might explain it but only then when I am done else it does not make sense! I currently have a problem with clearing stacks! When a stack has the value of 12 (You have to put them like this: 1 then 2 ontop 3 ontop… the orange card is a joker and counts as every card) Anyway when the top card is 12 the stack should be cleared! But it does not work… I tried to make a sprite that overlaps and deletes but it did not work…


Oops… I more or less solved it… When I place down the card I set it to ghost througj sprites… Yeah

1 Like

Ok! I fixed it and then destroyed it again… I got the clearing the finished stack thing done… Then I made a temporary card remove thing (for testing) and then I ran into a problem (has nothing to do with the delete thing) Whenever I delete the full stack I set all with kind of SETcard (which are the cards and the stack card (the stackcard is the one on the bottom left) that means after I delete them I set both to ghost (to not be able to remove them from any of the stacks! So I made the Stackcard (stackSprite) another kind! Now the stackSprite works again but the finished stack does not get removed! If you need more explaining (especially explaining the game) Tell me! @jwunderl knows how it is supposed to work (mostly) Thanks!

okay i think i fixed it!

I didn’t suuuper look into what was wrong, but I figured there was something funky happening with the overlaps code, so I took all the code inside the “setCARD overlaps coll” event and threw it into a new function called “check if completed deck”. I called the new function after we set the card down in the “A button released” event and it worked! (well, at least once, i stopped trying after)

I also added a debug flag which will stack the deck in your favor and give you increasing cards. Feel free to toggle it off :slight_smile:

1 Like

Well you kinda fixed it! First of all thank you! If you only use the ones on your hand (the five cards) it works fine! But when you use your stack card it will not clear the stack card…
I normally try it by disabling win (when your stack is empty you win) and then taking my stack cards to bring a stack to 10 and use the cards on my hand to finish it! So it is almost fixed! Thanks!

@livcheerful I think I got it! When I set down a card fom my stack I do not set it to setCARD! Thanks! (I will tell you if it is the problem it just came to my mind!)

Jup! all fixed! Her is the github page!

Here is the game!

1 Like

how do you play?

Hello there again! I need help again!
ISSUE 1 In this game to end your turn you place down a card from your hand (0ne of the 5) Then it is the enemies turn (not coded yet) Then when it is your turn again you pick up as many cards as you need to have 5 cards in total (on your hand) The setdown card lays there open to the enemy but you can still use it! There normally is 4 stacks which each can fit 4 cards, but I did not have that much space so I made 3! When you drag it on the setdown stack (currently the one on the left (the grey thing) is stack 1 and the one that is being coded!) the card setdown will be set to a kind (For stack 1 it gets set to s1, stack 2 to s2 and stack 3 to s3) When the card is taken of the stack it gets set to kind card! But when the card does not fit on the stack since it is kind card it will snap into the hand cards instead of the stack where it came from!
ISSUE 2 When you press the Menu button the cards refill… But when you spam it a lot of cards will come… Which makes no sense bc I made something against it… So if cardsinhand ≠ 5 only then it can give me cards… but even when you have 5 cards and you spam it goes “around” this safety thing…
I need your help! (Ignore the unused stuff flying around maybe I need it later)

Watch this video! (I might do an actual description for mine when its done) Only thing different is that we like to play it that way: The person who has the lowest value on their stack begins and not the one on the left!

Hello! Unfortunally I have to discontinue this project… Without help I can not continue this game and I have been waiting for multiple days… So I basically wasted time on this just to end up in a dead end not because the game is too big but I just can not go on when the game does not work as intended! So sorry everyone rhat reads this… You still can help but I gave this project up :confused:

1 Like

The issue in the menu button is your use of the timers extension. If we look at this part of the code:

The timers extension makes it so that the code inside those events runs in a separate thread. In other words, the menu button event won’t wait for the “after 100” and “after 200” events to run. Spamming the menu button will cause all of this code to run many times in parallel, which causes some unexpected things to happen. You can fix it by removing all of the timers code and moving the "cardsinHand’ variable up top:

Similarly, I’m not sure why you’re using the “After 100” in the “On A Button Released” block.

For the other issue, I see you setting the data “sd1” in the overlap event when you pick it up. Couldn’t you read that value when it’s released to put it back in the proper spot?


Thank you faor fixing that issue! And well no I can not use the sprite data… In the on A button released there are if stack 1 works… stack 2… Else: Put it on the Rightest card spot! But when you insert and If data is sd1 else something all the cards bug away from the screen bc all cards get set to a place and when cards overlap they change by -17 (thats how the restocking works)