# Need help merging several sketches

**URL:** https://discourse.processing.org/t/need-help-merging-several-sketches/25083
**Category:** Libraries
**Tags:** homework
**Created:** [October 31, 2020, 9:34pm UTC](https://discourse.processing.org/t/need-help-merging-several-sketches/25083 "2020-10-31T21:34:03Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [November 1, 2020, 6:29pm UTC](https://discourse.processing.org/t/need-help-merging-several-sketches/25083/2 "2020-11-01T18:29:51Z")

</div>

I think that’s similar but he has problems:

See [Load a different background sketch and automatically change each 30 seconds](https://discourse.processing.org/t/load-a-different-background-sketch-and-automatically-change-each-30-seconds/25101/5)

In general from draw() call new functions draw1, draw2 and draw3 depending on sketchNumber, a new variable you have to declare globally.

In draw1 / draw2/ draw3 copy your draw function from the old sketches

Increase sketchNumber when `frameCount%10*frameRate==0`

---

_[View the full topic](https://discourse.processing.org/t/need-help-merging-several-sketches/25083)._
