Discuss Scratch

ObliviousAce
Scratcher
11 posts

My "Hide" button isn't working.

Hi. I have a problem with my project. I have a script like this:
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.

SpideyPlaysMC wrote:

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.

alpenianA wrote:

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.

deck26 wrote:

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.

ObliviousAce wrote:

deck26 wrote:

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
So all we can do is guess.

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.

deck26 wrote:

ObliviousAce wrote:

deck26 wrote:

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
So all we can do is guess.

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?
okay…so, i found out the problem. My hide button is only working when it is
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.

aarizkamran wrote:

Then it's a problem somewhere else
what should i make the forum thread name called then?
ObliviousAce
Scratcher
11 posts

My "Hide" button isn't working.

aarizkamran wrote:

What other scripts are in the button ?
i'll make a sample project
ObliviousAce
Scratcher
11 posts

My "Hide" button isn't working.

aarizkamran wrote:

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.

aarizkamran wrote:

and this to the flightatendant sprite
when green flag clicked
switch costume to [ FLIGHTATTENDENT v]
and
when green flag clicked
forever
if <(costume #) = [2]> then
broadcast [ button time v]
else
broadcast [ nothing v]
end
Please set up the project to show the problem to avoid any confusion.

Powered by DjangoBB