Discuss Scratch

koolaidscratch
Scratcher
4 posts

Green flag twice and scores and some other stuff

in my project https://scratch.mit.edu/projects/577613600 sometimes i need to click the green flag twice for the menu music to play, and not the game music. the main music sprites are in the menu and player sprites. i also need help figuring out how to make a user high score and all time high score to work. i would also like to make it so the green ufo left and right bullets get deleted when they touch the wall (Laser8A and Laser8C). also if you find any other glitches and know how to fix them please tell me. you can contact me at KoolAid#3511 on discord. i am also new to scratch so some of these problems ca be easy to fix but i am not good at scratch.
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

Ok! I'll take a look at the project.

“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

So would you like a cloud high score or a high score just for the player?

“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

Ok you can make the lasers delete by doing this:

if <(x position) < [a certain postion]> then
delete this clone

end

Last edited by rayhan-z (Oct. 3, 2021 02:04:19)


“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

Hope that helps

“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

If you need help contact me.

“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)
anuntitledscratcher
Scratcher
28 posts

Green flag twice and scores and some other stuff

Hello! I remixed the project and uploaded it here.

1. I found a pretty simple fix for the music problem. In the “Menu” sprite, “when the green flag is clicked”, I set the “Play” variable to 0. (I'm pretty sure it works in tandem with the code that only makes the ufo's, bullets, and timer, work when the “Play” variable is equal to 1, which I talk about in the 4th point)


2. To fix the bullets from streaming down the left and right sides I added some code to delete the clone if it's x position was above 230, or below -230, the coordinates of left and right sides of the screen.


3. I created a fairly simple Local and Global High Score system in the “High Score Menu” sprite using 3 variables. I explain it in the sprite a bit more.


4. I noticed that the game started even if you didn't click “play”, so I made the ufo's, bullets, and timer only work if
<(Play) = [1]>
Also, just a personal suggestion (and I didn't implement it into the remix), but I felt like the amount of ufo's was a bit much and sometimes made mobility impossible, so I'd delete 1 one of them (as well as the bullet that goes along with it) and just make the rest of the other bullets' speed a bit faster (to balance out the difficulty).

Sorry if this was long and confusing, but I hoped it helped. If you have any questions, I'll be happy to clear them up!

Last edited by anuntitledscratcher (Oct. 3, 2021 20:39:59)

koolaidscratch
Scratcher
4 posts

Green flag twice and scores and some other stuff

Thank you guys so much now all i need is to make endless mode
rayhan-z
Scratcher
83 posts

Green flag twice and scores and some other stuff

ok good luck!

“I like to think of myself, actually, not as a code writer, but an author. I just use zeroes and ones instead of words, cause words let you down.”
-Free Guy (2021)

Powered by DjangoBB