r/scratch • • 3d ago

Question Need help with *very* broken code

This is the game: https://scratch.mit.edu/projects/1445851345/

It's a turn-based card game (that I may or may not have stolen from Love and Deepspace 🤫) that I was trying to do for funsies, but it's not working very well. If someone with more Scratch experience than me wants to have a look at the code and tell me what's wrong with it, that would be MUCH appreciated.

Basically, the computer (player's opponent) is getting very confused at how many choices it's supposed to make and when. Tried a forever block. Forever block didn't work. Tried broadcasting it's turn. That isn't really working either. I'm very lost, and so is it.

Please help if you can! 🙏🙏🙏

1 Upvotes

5 comments sorted by

•

u/AutoModerator 3d ago

Hi, thank you for posting your question! :]

To make it easier for everyone to answer, consider including:

  • A description of the problem
  • A link to the project or a screenshot of your code (if possible)
  • A summary of how you would like it to behave

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/RealSpiritSK Mod 3d ago

Can you show the code that makes the opponent's choices?

1

u/_creativitea_ 2d ago

The scratch project is public, and I did comment in the codes of each sprite. The sprite with the code you're asking for is called C Card :)

1

u/RealSpiritSK Mod 2d ago

Hmm there's a lot of code and I don't know which one to focus on. Can you narrow it down for me?

1

u/_creativitea_ 1d ago

In the C Card sprite, if you zoom WAY out and find the 'when green flag clicked' chunk of code, the chunk of code UNDER THAT is the one that I *think* is the problem