Issue with the score system - Im newbie

I’m working on my game but then I check the score system and I don’t know how to fix the spam when touch the nuclear because my plan was make the nuclear change to the wind turbine when press B and the player can get 1 point only from changing and can’t get or spam it anymore.

I didn’t really finish it but please help me out, I really appreciated the comment you guys give me

1 Like

Alrighty, I see your problem
I made a simulation involving an example of fixing your problem.

It uses functions and the sprite data extension, hope you learn from it!

2 Likes

I went through your code, and (I think) fixed your problem. I added a new variable and some new blocks, and put comments on them so you know what’s going on.

Notes
  • My new code may not work with more than one nuclear plant in the game. I only saw one, but if you plan on adding more to the level, reply and I (or someone else) can try to help you again.

  • Great game, I can’t wait to play it when it’s finished.

1 Like

Hello!
Welcome to the Forum.
You might want to wait for however many seconds after a score is given, meaning they cannot spam it.
If you want me to, I can fix the issue

1 Like

I appreciate you, thank you so much!

I plan to add more and fix the game, I place the coin represent the nuclear plants. Here is the link of the game I fix and appreciate you if you can: https://arcade.makecode.com/S66470-23868-57707-59036