# Make Test Disapear after a certain condition has been met

**URL:** <https://forum.code.org/t/make-test-disapear-after-a-certain-condition-has-been-met/25296>\
**Category:** Unit and Lesson Discussion\
**Tags:** csd-unit-3\
**Created:** [March 4, 2019, 8:22pm UTC](https://forum.code.org/t/make-test-disapear-after-a-certain-condition-has-been-met/25296 "2019-03-04T20:22:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbrinkman](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pbrinkman](https://forum.code.org/u/pbrinkman)\
**Post date:** [March 4, 2019, 8:22pm UTC](https://forum.code.org/t/make-test-disapear-after-a-certain-condition-has-been-met/25296/1 "2019-03-04T20:22:44Z")

</div>

My students are making a games now. They are having a blast. We have are having a problem makeing text disappear of the screen . They want a title of their game to appear for a short while and then disappear. I can use the text command to get the title to appear, the question is how can I clear it?

---

<div class="post-metadata">

**Author:** ![jold](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jold/32/5811_2.png) [@jold](https://forum.code.org/u/jold)\
**Post date:** [March 4, 2019, 8:34pm UTC](https://forum.code.org/t/make-test-disapear-after-a-certain-condition-has-been-met/25296/2 "2019-03-04T20:34:52Z")

</div>

You can clear it by not drawing it the next time through the loop and redrawing the background or another sprite.  
This can be done with an if/else statement.  
You just need a mechanism to change the value of condition. Use a counter variable and

```auto
if (counter < 50)
{//draw text}
else
{//don't}

counter = counter + 1;

```

or by mousePressedOver(sprite) over a certain sprite.

```auto
var condition = true ;

if (condition == true)
{
    text("draw me", 200,200);
}
else
{
  //don't draw me anymore. 
}

if (mousePressedOver(sprite))
{
   condition = false ;
}
```
