# Double Conditional Dilema

**URL:** <https://forum.code.org/t/double-conditional-dilema/27234>\
**Category:** CS Discoveries\
**Created:** [June 6, 2019, 9:35pm UTC](https://forum.code.org/t/double-conditional-dilema/27234 "2019-06-06T21:35:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chadwicko](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@chadwicko](https://forum.code.org/u/chadwicko)\
**Post date:** [June 6, 2019, 9:35pm UTC](https://forum.code.org/t/double-conditional-dilema/27234/1 "2019-06-06T21:35:27Z")

</div>

A student is trying to get sprites to only disappear when clicked && when the sprites before them are clicked ( order = Top left, top right, Bottom left, bottom right)

Would love some assistance, please and thank you.

> **[Check out what I made](https://studio.code.org/projects/gamelab/sWN4LcdBG7smbqMR-wf8cVa-lEtjHl3NACMiTWK6x-s)**
>
> I wrote the code myself with Code.org

---

<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:** [June 10, 2019, 6:52pm UTC](https://forum.code.org/t/double-conditional-dilema/27234/2 "2019-06-10T18:52:48Z")

</div>

They are on the right track with the series of if and if/else statements that are in lines 45-63 but have some issues.

I would suggest making a series of if statements without any elses. Some of the else braches are not working as intended anyway.

I like the idea that the student is using the visibility property as a condition. The one in line 54 has incorrect syntax though. You need to use the == sign instead of = to test for equality.

You can more than one && in the if condition but I don’t think you need to. Think about which sprite needs to have visible == false to uncover the next message.

Let us know how it goes and if you’d like a more detailed solution.

---

<div class="post-metadata">

**Author:** ![chadwicko](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@chadwicko](https://forum.code.org/u/chadwicko)\
**Post date:** [June 10, 2019, 9:02pm UTC](https://forum.code.org/t/double-conditional-dilema/27234/4 "2019-06-10T21:02:07Z")

</div>

That was awesome and much appreciated. We printed your ideas and talked about them, after a few minutes it all came together. The young lady with the question is thrilled.
