Discuss Scratch

sparrowdudebirder
Scratcher
100 posts

Costumes won't work.

I'm trying to make a message that says: Warning! This action may be permanent! Are you sure you want to continue?
And it has a yes and a no button and when you put your mouse over one of the buttons it turns blue. The only problem is the yes button doesn't change blue. My coding is like this:
 
when green flag clicked
go to front
set [ warning up?] to [0]
hide variable [ warning up?]
go to x: (0) y: (0)
switch costume to [ 1]
hide
when I receive [ done]
set [ warning up?] to [1]
show
repeat until <(warning up?) = [0]>
if <<(mouse y) < [-12]> and <<(mouse y) > [-47]> and <<(mouse x) > [-44]> and <(mouse x) < [-95]>>>> then
switch costume to [ 2]
if <not <<(mouse y) < [-12]> and <<(mouse y) > [-47]> and <<(mouse x) > [-44]> and <(mouse x) < [-95]>>>>> then
switch costume to [ 1]
if <<mouse down?> and <<(mouse y) < [-12]> and <<(mouse y) > [-47]> and <<(mouse x) > [-44]> and <(mouse x) < [-95]>>>>> then
set [ warning up?] to [0]
broadcast [ hide]
hide
if <<(mouse y) < [7]> and <<(mouse y) > [-50]> and <<(mouse x) > [25]> and <(mouse x) < [82]>>>> then
switch costume to [ 3]
if <not <<(mouse y) < [7]> and <<(mouse y) > [-50]> and <<(mouse x) > [25]> and <(mouse x) < [82]>>>>> then
switch costume to [ 1]
if <<mouse down?> and <<(mouse y) < [7]> and <<(mouse y) > [-50]> and <<(mouse x) > [25]> and <(mouse x) < [82]>>>>> then
set [ warning up?] to [0]
broadcast [ hide]
hide
end
Please help!
(The if <> then: blocks are not in each other I couldn't find out how to take them out in this block view thing)

Last edited by sparrowdudebirder (Dec. 6, 2017 12:34:37)

mstone326
Scratcher
1000+ posts

Costumes won't work.

Without seeing the actual project it will be hard to help. Not sure where you buttons are and what else is going on in the project at that time.

High School Athletic Director / Middle School Tech Teacher / High School Baseball Coach
Kung Fu by Nintendo 1984 - https://scratch.mit.edu/projects/369994801/
Taco Defense - Speed Typing - https://scratch.mit.edu/projects/316795450/
Halloween Boss Battle - Taking Back our Woods - https://scratch.mit.edu/projects/257155118/
Almost Pong - https://scratch.mit.edu/projects/656276979/
Studio - My Best Projects - https://scratch.mit.edu/studios/4125978/
Forum Help Project Examples - https://scratch.mit.edu/studios/4133335
asivi
Scratcher
1000+ posts

Costumes won't work.

If your buttons are costumes, why you are checking mouse-pointer coordinates instead of mouse-pointer touching your sprite?
sparrowdudebirder
Scratcher
100 posts

Costumes won't work.

Never mind I think I figured out what was wrong. thanks anyway.

Powered by DjangoBB