# Why will start not = true?

**URL:** <https://discourse.processing.org/t/why-will-start-not-true/44215>\
**Category:** Coding Questions\
**Created:** [April 2, 2024, 2:25pm UTC](https://discourse.processing.org/t/why-will-start-not-true/44215 "2024-04-02T14:25:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillyGrz](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@WillyGrz](https://discourse.processing.org/u/WillyGrz)\
**Post date:** [April 2, 2024, 2:25pm UTC](https://discourse.processing.org/t/why-will-start-not-true/44215/1 "2024-04-02T14:25:53Z")

</div>

I’ve been out of coding for a few months and am trying to get back into it with a platformer. Was working on the backbone, and I can’t make start true with anything! Any ideas?  
float playerX;  
float playerY;

boolean start;  
boolean level1;

void setup(){  
fullScreen();  
background(106,218,240);  
playerX=width/2;  
playerY=height/2;  
}  
void draw(){  
if(start==true){  
if(mouseX\>width/2){  
level1=true;  
start=false;  
}  
}  
if(level1==true){  
fill(245,72,72);  
stroke(206,98,98);  
strokeWeight(width/800);  
square(playerX,playerY,width/10);  
}  
}

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [April 2, 2024, 3:14pm UTC](https://discourse.processing.org/t/why-will-start-not-true/44215/2 "2024-04-02T15:14:12Z")

</div>

First please format your code for this forum by placing you code between two sets of back-apostrophes like this  
```  
`// the code to format`  
```

Add this method

```auto

void keyTyped(){
  switch(key){
    case 's':
    start = true;
    break;
    // can add other case statements to handle other keys
  }
}

```

hitting the “s” key will set `start` true.
