# Help with P5.js Project

**URL:** <https://discourse.processing.org/t/help-with-p5-js-project/15823>\
**Category:** Coding Questions\
**Created:** [November 26, 2019, 2:35am UTC](https://discourse.processing.org/t/help-with-p5-js-project/15823 "2019-11-26T02:35:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheikah](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@Sheikah](https://discourse.processing.org/u/Sheikah)\
**Post date:** [November 26, 2019, 2:35am UTC](https://discourse.processing.org/t/help-with-p5-js-project/15823/1 "2019-11-26T02:35:22Z")

</div>

Hi,

I’m new to coding and I’m struggling trying to get my code to do what I want it to.  
My idea was to have 4 different buttons that, when clicked, change the colour scheme of the composition and have a unique effect that can only happen when that specific button is pressed (example: rain pouring, birds flying in when mouse is clicked, etc.).  
I’ve come up with code for some of the individual pieces but can’t figure out how to put it all together and make it function properly. Any ideas on how I might be able to make this work? (And feel free to let me know how I can clean up my code/make it more efficient).

This is my code right now:  
[https://editor.p5js.org/Sheikah/sketches/9n8NgSuub](https://editor.p5js.org/Sheikah/sketches/9n8NgSuub)

And this is a separate code for the birds I wanted to put in:  
[https://editor.p5js.org/Sheikah/sketches/NAzOThoLl](https://editor.p5js.org/Sheikah/sketches/NAzOThoLl)

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [November 26, 2019, 3:02am UTC](https://discourse.processing.org/t/help-with-p5-js-project/15823/2 "2019-11-26T03:02:21Z")

</div>

after the first 2 hard coded buttons it is a good idea to ask.

step 1: use variables and functions  
[https://editor.p5js.org/kll/sketches/5hBxVwuAP](https://editor.p5js.org/kll/sketches/5hBxVwuAP)

next… [here](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=166)
