# HELP PLEASE! With a coding project

**URL:** <https://forum.code.org/t/help-please-with-a-coding-project/38092>\
**Category:** Coding and Debugging Help\
**Tags:** csd-unit-3\
**Created:** [May 10, 2023, 4:40pm UTC](https://forum.code.org/t/help-please-with-a-coding-project/38092 "2023-05-10T16:40:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurieann.lawson](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@laurieann.lawson](https://forum.code.org/u/laurieann.lawson)\
**Post date:** [May 10, 2023, 4:40pm UTC](https://forum.code.org/t/help-please-with-a-coding-project/38092/1 "2023-05-10T16:40:40Z")

</div>

I am helping students with a coding project for a “Passion Project” they are working on. They are asking a user a bunch of questions. They way they answer each question will lead to a new screen with a new question.

For some reason when I add on the screen to choose hot cocoa or hot tea the screen where the user is supposed to choose between a drink or food disappears, it gets skipped right over?

I have looked at this forever! I know I am missing something simple, but I can’t find it.

[project](https://studio.code.org/projects/gamelab/Np__aEetHJAdJyGMv7JFFe_uKPP6Vy76ncRZCYBHWpA)

---

<div class="post-metadata">

**Author:** ![varrience](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/varrience/32/8042_2.png) [@varrience](https://forum.code.org/u/varrience)\
**Post date:** [May 11, 2023, 4:48am UTC](https://forum.code.org/t/help-please-with-a-coding-project/38092/2 "2023-05-11T04:48:29Z")

</div>

Your Issue pertains to sprites being able to be clickable regardless if they are visible or not meaning you can do literally everything out of order, not to mention all of your choices are layered over each other meaning that you can either back track or forward all the way to the last screen, to keep track you should have a screen counter of sorts but to be quite frank with you i don’t really want to refactor this currently maybe if you understand what i mean you should be able to fix this

---

<div class="post-metadata">

**Author:** ![laurieann.lawson](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@laurieann.lawson](https://forum.code.org/u/laurieann.lawson)\
**Post date:** [May 11, 2023, 3:30pm UTC](https://forum.code.org/t/help-please-with-a-coding-project/38092/3 "2023-05-11T15:30:14Z")

</div>

Trying to understand, are you saying that if I make a sprite invisible that I should then relocate it?

Are you suggesting that maybe I could create a variable that keeps track of click counts?

Thank you!

---

<div class="post-metadata">

**Author:** ![varrience](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/varrience/32/8042_2.png) [@varrience](https://forum.code.org/u/varrience)\
**Post date:** [May 11, 2023, 7:51pm UTC](https://forum.code.org/t/help-please-with-a-coding-project/38092/4 "2023-05-11T19:51:28Z")

</div>

Well you can do that but since I’ve had a longer time to think about it i think this would be the more optimal approach to your problem

```auto
if (mouseIsOver(sweet) && mouseWentUp("leftButton")) {
// you can also use mouseWentDown if you'd like it to be as soon as you click
    SweetSav = false;
    pickSweet = true;
  }

```

it’s just one more condition to add on to your statement since mousePressedOver constantly checks for the mouse being pressed the issue you had described has made sense but with this method you shouldn’t have to refactor your whole codebase but it seems you may have found a better justifiable solution but anyways best of luck!
