Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » My "Hide" button isn't working.
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
Hi. I have a problem with my project. I have a script like this:
But for some reason it won't hide when I click The green flag
(The “show” button and the “When I receive Button Time!” are supposed to be together
)
when green flag clicked
hide
when I receive [Button Time!]
show
But for some reason it won't hide when I click The green flag

(The “show” button and the “When I receive Button Time!” are supposed to be together
)Last edited by ObliviousAce (Aug. 24, 2020 02:27:34)
- SpideyPlaysMC
-
Scratcher
500+ posts
My "Hide" button isn't working.
Is the broadcast being broadcasted at the same time as when you click the green flag?
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
Is the broadcast being broadcasted at the same time as when you click the green flag?no its being broadcasted when a costume number is 2, but it's way after the green flag
- alpenianA
-
Scratcher
17 posts
My "Hide" button isn't working.
Hmm is it possible that you accidentally have the ghost effect at 100? Or the costume number starts at costume 2?
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
Hmm is it possible that you accidentally have the ghost effect at 100? Or the costume number starts at costume 2?I can check…
- deck26
-
Scratcher
1000+ posts
My "Hide" button isn't working.
Always best to share the project rather than scripts out of context.
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
Always best to share the project rather than scripts out of context.but my project is for an FPC application and i dont want it to be unfinished
- deck26
-
Scratcher
1000+ posts
My "Hide" button isn't working.
So all we can do is guess.Always best to share the project rather than scripts out of context.but my project is for an FPC application and i dont want it to be unfinished
The main things to check are
- sprite layer - tell it to go to front
- sprite costume - make sure it has the right costume selected
- sprite size - make sure it isn't too small
- sprite position - if it's mostly off-screen you might just not be seeing it
- hide/show state
- ghost effect - but this is cancelled when the project isn't running
What happens if you tell the sprite to say something?
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
okay…so, i found out the problem. My hide button is only working when it isSo all we can do is guess.Always best to share the project rather than scripts out of context.but my project is for an FPC application and i dont want it to be unfinished
The main things to check are
- sprite layer - tell it to go to front
- sprite costume - make sure it has the right costume selected
- sprite size - make sure it isn't too small
- sprite position - if it's mostly off-screen you might just not be seeing it
- hide/show state
- ghost effect - but this is cancelled when the project isn't running
What happens if you tell the sprite to say something?
when green flag clicked
hide
But if i put
When green flag clicked hide.
When i receive Button time!
show
it wont work. The problem is that the hide button only doesnt work when its being hidden on the green flag and than being broadcasted to show. now thats the problem
Last edited by ObliviousAce (Aug. 24, 2020 18:56:30)
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
Then it's a problem somewhere elsewhat should i make the forum thread name called then?
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
What other scripts are in the button ?i'll make a sample project
- ObliviousAce
-
Scratcher
11 posts
My "Hide" button isn't working.
What other scripts are in the button ?look at my most reccent to see the problem
- jettypumpkin07
-
Scratcher
1000+ posts
My "Hide" button isn't working.
Hmm… 

when this sprite clicked
if <(toggle) = (0)> then
show
set [toggle v] to (1)
else
hide
set [toggle v] to (0)
end
- deck26
-
Scratcher
1000+ posts
My "Hide" button isn't working.
So what are we looking at? The FLIGHTATTENDANT sprite broadcasts ButtonTime which makes the sprite show.
- deck26
-
Scratcher
1000+ posts
My "Hide" button isn't working.
and this to the flightatendant spritePlease set up the project to show the problem to avoid any confusion.when green flag clickedand
switch costume to [ FLIGHTATTENDENT v]when green flag clicked
forever
if <(costume #) = [2]> then
broadcast [ button time v]
else
broadcast [ nothing v]
end
- Discussion Forums
- » Help with Scripts
-
» My "Hide" button isn't working.