Discuss Scratch

RedgoldfishWither
Scratcher
3 posts

Bullet code in a zombie shooter not working

My browser / operating system: Windows NT 10.0, Chrome 129.0.0.0, No Flash version detected

Well, uh, yeah at some point in the game, suddenly the code for the bullet just stops working. The code says for it to work in the backdrop where you play the game, but, idk, it just doesn't work. I would really appreciate questions or explanations, so yeah!
leog20162
Scratcher
84 posts

Bullet code in a zombie shooter not working

can you give me the link to the project?
Jlerpy
Scratcher
1000+ posts

Bullet code in a zombie shooter not working

Yes, share the project, or we just have no way of knowing.
RedgoldfishWither
Scratcher
3 posts

Bullet code in a zombie shooter not working

This thing has been edited because my game isn't finished yet.

Last edited by RedgoldfishWither (Sept. 23, 2024 21:16:44)

Neon64Goober
Scratcher
25 posts

Bullet code in a zombie shooter not working

Make sure to delete the clone of the bullet when its done with its path. That kind of thing trips me up sometimes.

To fix it just add a delete clone block after you hide the bullet.
Neon64Goober
Scratcher
25 posts

Bullet code in a zombie shooter not working

If you're wondering why this fixes it, it's because scratch has a max clone limit, so If you don't delete the clones when you're done with them, you'll hit the limit and it will stop making clones.

Also make sure to do what I said in the last post to the zombies too
RedgoldfishWither
Scratcher
3 posts

Bullet code in a zombie shooter not working

Neon64Goober wrote:

If you're wondering why this fixes it, it's because scratch has a max clone limit, so If you don't delete the clones when you're done with them, you'll hit the limit and it will stop making clones.


(Btw I don't know that much about forums, so yeah, I have to put this simply below your message.) TYSM, I needed that a lot. It worked, and honestly, I'm going to follow you for that. Since the game is not finished, I'm going to delete the link from my other message and unshare my game.

Last edited by RedgoldfishWither (Sept. 23, 2024 21:15:40)

Powered by DjangoBB