Discuss Scratch

ferretsarecool
Scratcher
16 posts

Oh no, this thing isn't working...

Please may someone from the scratch team or someone who knows how to fix this please reply-

I'm making a redwall game and at the begining, you get to make a charater selection. I was dong so well when all of a sudden, its started going all wrong. The scripts look like this-

when I receive [hareg v]
show
when I receive [mouseg v]
hide
when this sprite clicked
broadcast [harenight v]
hide
I've done it with other sprites too, but now, the button that says “pick this” (which belongs to the scripts above) doesn't work and others don't too. I will attach the game if nesercary so you can see, but I'd rather not yet, unless urgent. Please may someone help me, I'm so into making this game and I don't want to give up yet!

Thanks, Ferretsarecool
ChocolateTeapotNot
New to Scratch
100+ posts

Oh no, this thing isn't working...

Sharing the project will help enormously. However ensure you are only doing one broadcast at a time. Try following the logic in your code. The scripts that are running should glow so ensure only those that should be running are and try following the logic of your scripts and see if you can find the mistake.

My drmcw account has viewed too many forum topics so cannot view anymore! This account however says it all!
ferretsarecool
Scratcher
16 posts

Oh no, this thing isn't working...

Ah… I've got loads of broadcasts at the smae time, but I thought it was the only thing that would work… Have a look a this and see what you think of it…
Thanks

http://scratch.mit.edu/projects/16934526/
ChocolateTeapotNot
New to Scratch
100+ posts

Oh no, this thing isn't working...

Your next stage which is to pick a character only has when I receive girls. So only works if you choose to be a girl. I don't know how you want this to ultimately work so could be wrong but I'd have thought rather than broadcasting boys or girls then you should be setting a variable to boy or girl and then just use a broadcast “pick character”, then all the sprites that receive the pick a character can be displayed according to if the variable is boy or girl. You then want a variable for character and broadcast for the next thing that needs to be done e.g. choose name or start game. Broadcasting data is going to get messy quickly. A good rule of thumb is to broadcast verbs while nouns are for variables. So gender is a noun and would make a good variable and “choose gender” is a verb and so would make a good broadcast.

My drmcw account has viewed too many forum topics so cannot view anymore! This account however says it all!
ionvop
Scratcher
37 posts

Oh no, this thing isn't working...

I hate these scripts:

go to front

go back (10) layers

i leik animu and osu! :33
ionvop
Scratcher
37 posts

Oh no, this thing isn't working...

And this script block is useless:

<color [#f0f] is touching [#0f0]?>

i leik animu and osu! :33
ionvop
Scratcher
37 posts

Oh no, this thing isn't working...

What is this?:

([ v] of (9))

i leik animu and osu! :33
ferretsarecool
Scratcher
16 posts

Oh no, this thing isn't working...

I was planning on doing the boys later, just started with the girls for no reason when it all backfired on me. So annoying. Anyway, can you tell me how to add the varivbles to change from girl to boy? It would be very helpful
ChocolateTeapotNot
New to Scratch
100+ posts

Oh no, this thing isn't working...

How about in the boy button
when this sprite clicked
set [gender v] to [boy]
switch costume to [ticked costume v]
play sound [clicked v] until done
broadcast [Pick Character v]

My drmcw account has viewed too many forum topics so cannot view anymore! This account however says it all!
ferretsarecool
Scratcher
16 posts

Oh no, this thing isn't working...

Wait, but I want people to be able to pick whatever character they want throughout the whole game,but if you do costumes, then it goes to the one that it says to do next (Well, at least that's what I've been doing) please can you help me?
Thanks ChocolateTeapotNot
ferretsarecool
Scratcher
16 posts

Oh no, this thing isn't working...

Ooh, ooh, I know! What about a quiz to see what character you can be? Do you think that'll be easier?
ChocolateTeapotNot
New to Scratch
100+ posts

Oh no, this thing isn't working...

ferretsarecool wrote:

Wait, but I want people to be able to pick whatever character they want throughout the whole game,but if you do costumes, then it goes to the one that it says to do next (Well, at least that's what I've been doing) please can you help me?
Thanks ChocolateTeapotNot
It will. As long as those variables are global then they can be seen by everything in the program. When the Pick Character broadcast is received then all the character sprites can show, then when one is clicked you can set a variable to the character type. By the end of the process you will then have a set of variables, gender, character, and whatever else you want like name to be used in the rest of the program.

My drmcw account has viewed too many forum topics so cannot view anymore! This account however says it all!
ChocolateTeapotNot
New to Scratch
100+ posts

Oh no, this thing isn't working...

Does this help?

My drmcw account has viewed too many forum topics so cannot view anymore! This account however says it all!
-TheEye-
Scratcher
8 posts

Oh no, this thing isn't working...

Actually it is very helpful when you are doing a scrolling game and you need 4 squares with different colour bit like a trigger to help stay on the platform and scroll

ionvop wrote:

And this script block is useless:

<color [#f0f] is touching [#0f0]?>

If(Not Calm)
{Keep Calm}:
else
{Code On}

Powered by DjangoBB