Help and Questions

Ask questions, debug your code, and help others.

Some general guidelines:

  • Include as much information as possible: screenshots, code snippets, or even a link to your game
  • Search through the forums to see if your question has been answered before.
  • Feel free to jump in and share your expertise if you know the answer to someone else’s question!

Hello Richard!

Could you help me with my question on this topic:

Hello Richard!

In my code when I set a certain sprite to another sprite, instead of going to the location of the second sprite the first sprite will only go to one set location. Every single time. I have tried to set the location of the first sprite to a different sprite, however, it still goes to on set spot.

Hi @MiniNelson! Could you share a link to your code? Here’s a gif showing how to do that:

Hi @richard!
Here’s the link to the code - https://makecode.com/_JHvPhcKXVXLV

oh wow, that’s a lot of code! What part of the code is buggy? Could you post a screenshot of just that snippet?

Sure.


When I “set projectile2 to projectile from ALIEN4 with vx(0) and yx(0)” and then “set projectile2 to sprite of kind Projectile2.” Instead of setting projectile2 from ALIEN4 it sets projectile2 at a set spot in the middle of the screen.

Thanks! That code is creating two different sprites, one that is a transparent projectile on top of “ALIEN4” and another that is a transparent sprite in the middle of the screen. The second one is overriding the first, which is why you’re seeing it in the middle of the screen.

I think you want to use the “set kind” block instead of “create sprite”, like this:

You’ll find the block in the “overlaps” section of the block category.

Thanks! That fixed the problem I was having.

Hi, I want to increase the tempo in a game as the game progresses, to add some suspense. I can’t seem to get the “change tempo by xx bpm” to work. In this iteration, I’ve got it in a logic block, but I’ve tried it in “on start”, “on game update”, “on overlap”. I just want the tempo to change!

Here’s the link: https://makecode.com/_M4PXCkeWwf1y
Thanks

@bee, you need to use the tempo block in your playMelody. right now it’s hardcoded to 200

Thank you so much! That’s been bugging me for weeks.

I want to make enemies go from the top to the bottom, @richard. link: https://makecode.com/_1vg05UdCUFc2

@kingcobralasersnakes try something like this:

thanks!

hello @richard ! The code won’t work.

https://makecode.com/_ejEHWbTTE4qH

@kingcobralasersnakes
The “2” you have there is actually a text block and not a number. If you grab a number block from the math category and place it over the “2”, it should work!

I see thanks!

sorry a better image is this:


focus on the if “image =” part

this won’t work: