# How to make object shoot in Processing

**URL:** <https://discourse.processing.org/t/how-to-make-object-shoot-in-processing/32087>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [September 4, 2021, 7:33am UTC](https://discourse.processing.org/t/how-to-make-object-shoot-in-processing/32087 "2021-09-04T07:33:55Z")\
**Posts on this page:** 1\
**Showing post:** 11

<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:** [September 19, 2021, 7:33pm UTC](https://discourse.processing.org/t/how-to-make-object-shoot-in-processing/32087/11 "2021-09-19T19:33:20Z")

</div>

> [@How to make bullet shoot only when the previous bullet is off the screen](https://discourse.processing.org/t/how-to-make-bullet-shoot-only-when-the-previous-bullet-is-off-the-screen/32314/2):
>
> this would be enough: just check if the bulletFlies and if so, leave else if (key == ' ') { if (bulletFlies) return; // leave bulletFlies=true; bulletX = gunX+14; bulletY = gunY+4; }

---

_[View the full topic](https://discourse.processing.org/t/how-to-make-object-shoot-in-processing/32087)._
