# How to skip a method in Processing

**URL:** <https://discourse.processing.org/t/how-to-skip-a-method-in-processing/41837>\
**Category:** Coding Questions\
**Created:** [April 26, 2023, 5:18pm UTC](https://discourse.processing.org/t/how-to-skip-a-method-in-processing/41837 "2023-04-26T17:18:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ImLandfall](https://avatars.discourse-cdn.com/v4/letter/i/ecccb3/32.png) [@ImLandfall](https://discourse.processing.org/u/ImLandfall)\
**Post date:** [April 26, 2023, 5:18pm UTC](https://discourse.processing.org/t/how-to-skip-a-method-in-processing/41837/1 "2023-04-26T17:18:33Z")

</div>

So I thought I could use " ! " in some way but is there a function to skip a method or something like it?

if(player.isDestroyed == true) {

}  
and if it is true, I want it to skip drawplayer.

---

<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 26, 2023, 7:29pm UTC](https://discourse.processing.org/t/how-to-skip-a-method-in-processing/41837/2 "2023-04-26T19:29:44Z")

</div>

> [@ImLandfall](#):
>
> if(player.isDestroyed == true) {
> 
> }

```auto
if(!player.isDestroyed) { // in other words player is alive
    drawplayer();
}
else {
    // code to execute if player is destroyed 
}

```

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [April 26, 2023, 7:45pm UTC](https://discourse.processing.org/t/how-to-skip-a-method-in-processing/41837/3 "2023-04-26T19:45:59Z")

</div>

> [@quark](#):
>
> `if(!player.isDestroyed) { `

`if(player.isDestroyed == false)` // this equals " ! player.isDestroyed"
