Create PT -- Buttons, (programming)

I have a student who is creating a type of “Finding Waldo” clicker game. He needs to be able to hide the button but still be able to use the button. I’m just learning as well. Any suggestions?

Thanks in advance.

Hi @syoder ! Student generated problems are the BEST! I learn so much from fixing 36 problems simultaneously… it is exhausting, but rewarding at the same time.

Here is my thinking… I wonder if the student should just make the button transparent. You can do this in design mode (by moving the transparency slider below the color slider) or by changing the background of the button (by modifying the “a” value).

This will make the button clear, but still clickable. Doe that work for your purposes??

1 Like

That did it. Neither of us had seen the slider below the color. We had tried several things including hiding the button to no avail.
Thank you for the help. Everyday I learn something new!
Thanks again!!

1 Like

Is this game for their official Create PT? If so, we are not supposed to help them debug their issues. Their fellow students are the only people that can help them with their Create PT. You might was to take a look at pg. 83 of the Course and Exam Description Guide which states “a teacher may not write, revise, amend, or correct student work, including debugging the program.”

We all appreciate your enthusiasm to help your students and it’s difficult as a teacher to not want to help, but we must follow the guidelines given to us. Good luck!

Thank you for the reminder. No, he was using it during the “Create your own clicker game” in Code. We are on block schedule and move pretty fast. He was a bit behind. Fortunately, his Create task is totally different.

Thanks again for your help.

I’m essentially having the same problem, but my student is trying to use a button and loop to make the entire screen fade away. It worked briefly and then stopped. Thoughts?

///story start
onEvent(“play”, “click”, function( ) {
setScreen(“woods1”);
playSound(“aaaaaaaaaaaaaaaaaaaaaa.mp3”, true);
});
setTimeout(function() {
i = 0
while (i <= 10) {
r = 0
g = 0
b = 0
a = 1
setProperty(“woods1black”, “background-color”, “rgba(” + r + “,”+ g + “,” + b + “,” + a + “)”);
a = a - 0.1
i = i+ 1
}
}, 5000);

Actually, think we figured it out. Each time it loops, it resets the opacity to 1.