You Can Talk About Hopscotch Here; Topic 30 [OFFICIAL]

sure—that sounds fun! have you created a topic?

7 Likes

@CodeHelp
I kinda have given up at this point but the green tank eventually gets infinite shots and I don’t know why. (Your only supposed to be able to have three shots at a time.)
This is kinda ruining the game because then green gets a huge advantage and can spam shots.
I actively can not change this right now because this was made with advanced mode.
If someone does find out why this is happening please tell me and I can reward you if you would like.
Sorry for the messy code this was made awhile ago
Most of the things you need to look at are in the bottom left corner

8 Likes

Hey it’s going alright, you? Been far too long :]

4 Likes

The best way would be to use a variable that keeps track of how many shots the tank has fired. If that number is below a certain threshold, it allows the tank to fire. If it’s at or above that threshold, it prevents them from firing.

As for how the number goes down, just decrease it by 1 before each destroy of the projectile.

Edit, I see you already did this…

Maybe the shots power-up is overwriting the threshold check…?

Ok, easy fix, you just need to do the “green shots < 3” check again within the “shots power-up” check. The problem was the powerups are ignoring the 3 shots max rule. This occurs in all tanks, btw…

4 Likes

The shots power up is supposed to give you infinite shots temporarily. If i do this wouldn’t the player not get the bonus?

5 Likes

This seems to be happening with all power-ups, lol. (Speedy, saw, etc.)

What I do when something doesn’t work correctly and cannot figure out why is I’ll make myself a debug screen, which shows values of what’s going on in the background that the user wouldn’t normally see…

4 Likes

Does anyone want to give me a quick run down on the set origin block?
I’ve never used it…
Also used the undo button for the first time and it felt heavenly.

5 Likes

I made this awhile ago it driving me nuts how unorganized and buggy this is for how fun it was.

4 Likes

You think your project is messy?

The editor in these two are flat-out unbearable.

3 Likes

Well found a problem


All of a sudden the amount of shots on the field started decreasing rapidly into the negatives
Searching for the cause

4 Likes

Hmm… strange. I was going to say “it may be caused my multiple clones running some code that does this,” but I am already aware you used a rule that only uses itself only (if you aren’t, then you should be)

Temporary fix: just add a repeating check that forces it back to 0 if the number goes below 0.

As in

When shots fired < 0 { set shots fired to 0 }

3 Likes

Found the problem the bullet was setting is position to the tank unlike the others and when the tank went to the edge it went wako.
I fixed it but I went to publish an update it just remixed it…
Is there a way so it doesn’t make a remix?

6 Likes

It’s probably because I’m still looking in the project…

Funny how it was just the green tank that went haywire… I created a debug that showed all colors, and it was only the green one that seemed to go down infinitely. It’s still good to keep a debug for all colors, just in case…

4 Likes

Its been going pretty good, uni has been good, and I’ve been working an a fair amount of programing projects, as well as a lot of blacksmithing lol. it has indeed been too long lol

4 Likes

That’s why it remixed?

4 Likes

:man_shrugging:

I don’t know… maybe…? You’re sure you tapped “Publish Update” and not “Publish Remix”?

2 Likes

https://files.catbox.moe/3gyzpv.MOV

4 Likes

Hmm… Updating a project puts it back into the filter, even if you never changed any of the images… that’s completely normal. If it was a remix, you would still see your older project…

2 Likes

It’s like making a whole new project, I just want to up the original not make a new one.

3 Likes

Updating simply deletes the old version and replaces it with the new version up at the top. You can’t avoid the filter reset, unfortunately. You will always get that message no matter what.

It also always puts it at the top, and not where your old one was (as projects in your published section are sorted by date created / modified).

2 Likes