Making text appear and disappear

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

Student Project
My student is creating the Interactive Card in Lesson 17. She wants to make her text appear after her envelope disappears (scale property is uses here). The text appears, but she can’t make it disappear when the present appears. (Left mouse button.
The text appears when the envelope disappears but it will not disappear when the mouse button is clicked.
The student created a variable to control the text. She tried using an if/else block. She tried using separate if blocks, one checking if the t variable is true and one if it is false. She included the empty text string.

@skschiltz ,

I see what is happening here. They have coded it correctly, but there is a line of code (line 55), that makes the t variable be true if the envelope scale is larger than 3.0.

Even though line 48 of the code makes the envelope disappear, it’s scale is still larger than 3.0, so when they click on the mouse, it becomes false for a split second and then true again when it sees that the envelope is still large.

There are a number of ways to fix it, but maybe that much information will be enough for your student to find a way to fix it? Perhaps do something after the envelope that disappears that will make it so the t variable doesn’t continuously get triggered?

If they need more help, please don’t hesitate to check back in with us.