# Help with Checking/Getting #sprites #visibility

**URL:** <https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, navigate-screen\
**Created:** [August 24, 2021, 11:58pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430 "2021-08-24T23:58:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 24, 2021, 11:58pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/1 "2021-08-24T23:58:56Z")

</div>

I am trying to figure out a way to check if #sprites are #visible or not.  
I have 30 sprites to check for after collision.  
 ![If Sprites are Visible True Thunkable2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/1200b5f800c184ac307266677eb04ec3cfe35567.png)

![If Sprites are Visible True Thunkable3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/8/68088242e1c299e553559be3d1568f6841d103c8.png)

![If Sprites are Visible True Thunkable4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/c/1c44b6888ffa10993b165e13cd29b09ba973f807.png)

I have tried all of these, the last of which seems to give me some sort of result but the exact opposite of what i need and changing the value to true doesn’t help and doesn’t give me any result what so ever.  
is there an option to do this without having to call every single sprite’s visibility?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 25, 2021, 6:31am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/2 "2021-08-25T06:31:26Z")

</div>

> [@1negroup](#):
>
> is there an option to do this without having to call every single sprite’s visibility?

No, there is NOT.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 25, 2021, 6:37am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/3 "2021-08-25T06:37:29Z")

</div>

Ok Thanks.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 25, 2021, 9:32am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/4 "2021-08-25T09:32:57Z")

</div>

Ok so i think i found somewhat of a solution but i think there is a #bug with the #visibility and the #logic blocks.  
Get the visibility = false doesn’t work and but the function IS WORKING it just seems to ignore the is false.  
I even tried the NOT block and that seems to be ignored as well.  
 ![If Sprites are Visible True Thunkable5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/b/dbeaeeeafcc59bc9fcda395e5f6686661ac00501.png)  
 ![If Sprites are Visible True Thunkable6](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/3/8392d3b11609223c12a9057f425e48678e008526.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 25, 2021, 10:00am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/5 "2021-08-25T10:00:39Z")

</div>

This is not a solution.  
You are just repeating the same mistake.  
You cannot use a list to test collective true/false condition.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 25, 2021, 11:14am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/6 "2021-08-25T11:14:59Z")

</div>

Practical approach

I first made a function to loop through all available `sprites` in the specific `sprite type` and will return **TRUE** if all are hidden, otherwise will return **FALSE**  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c563adb0eef7034dc603e807a58ca0dbdec068ec.png)

I then made added 3 buttons to the screen

- A button to **hide** all sprites.
- A button to **show** all sprites.
- A button to call the function to **check if all are hidden**.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/75cac9b5bf2f6c795fe30ed9708def86ffec8350.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce360bb2f06c7b3b4c3e096cfec6952e1ea2018b.png)

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f380ef9a15ac4c028f1e7e24ded5f2c8c5f28b9.png)

I was getting the right message in the label every time.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 25, 2021, 9:18pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/7 "2021-08-25T21:18:04Z")

</div>

Thank You. Are you able to show me the blocks for the variable?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 26, 2021, 8:18am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/8 "2021-08-26T08:18:34Z")

</div>

Can you please explain more?  
What variable do you mean?

The code I copied is all what is required to do the job and I added just two other buttons to set visibility of the sprites as True/False to test that my code is working.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 26, 2021, 11:42pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/9 "2021-08-26T23:42:12Z")

</div>

Oh Ok i thought the thisSprite block was a variable block.  
Can you send me a link to the app?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 27, 2021, 6:27am UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/10 "2021-08-27T06:27:49Z")

</div>

I have to recreate it. I just made the test and then deleted it.

Will do that later

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 27, 2021, 3:02pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/11 "2021-08-27T15:02:06Z")

</div>

I made a sample app  
[https://x.thunkable.com/projectPage/6128f82aefc8a20010ccb22f](https://x.thunkable.com/projectPage/6128f82aefc8a20010ccb22f)

There are **TWO** buttons. One to check if all `sprites` are hidden and show the appropriate message.

The other button will show a list of `Sprite IDs` and a status text to say “Visible” or “Hidden”. Once you click on any item it will hide it if it is visible or show it if it is hidden.

You can check if all are hidden at any time and see that the app is giving expected results.

---

<div class="post-metadata">

**Author:** ![1negroup](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/1negroup/32/114253_2.png) [@1negroup](https://community.thunkable.com/u/1negroup)\
**Post date:** [August 27, 2021, 9:49pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/12 "2021-08-27T21:49:42Z")

</div>

Hey Thank you Very much muneer

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/help-with-checking-getting-sprites-visibility/1467430/13 "2024-11-08T13:17:05Z")

</div>


