How do you create another scene in composer

Currently it has it’s main.lua, scene1.lua, scene2.lua, and scene3.lua how do I add a scene4? I can’t seem to find anything on it :confused: Thank you for the help! 

There are many different ways to make a scene4.lua. Here are a few:

  1. In your text editor create a new file and save it as scene4.lua. Of course it has to have the core scene code for it to be an actual scene.

  2. Download the scene template from the documentation (well Copy/Paste) https://docs.coronalabs.com/api/library/composer/index.html#scene-template into a new file and save it as scene-template.lua. Then in the future, you can just copy scene-template.lua to scene4.lua or scene5.lua, then edit it and add your changes.

  3. Copy an existing scene, such as scene3.lua to scene4.lua and modify scene4.lua with your changes.

As long as you’re starting with a valid scene file (writing it yourself, copy/pasting the template from the docs, repurposing and existing scene) then you should be able to go to that scene and have it work. Of course you’re responsible for your code in scene4 doing what it needs to do.

Finally a random suggestion, I don’t know what you’re scenes are, but it’s usually better to give them real names instead of scene1, scene2, etc. like menu.lua, gameover.lua, nextlevel.lua and so on, unless you’re telling a linear story where it makes sense to go from scene1 to scene2 to scene3, etc.

Rob

I just saw you have another thread where you asked the same question. Please only ask your question once. I’m going to lock this thread. Anyone wanting to respond, please do so here:

https://forums.coronalabs.com/topic/67610-how-do-i-add-a-scene4-to-composer-im-very-confused-on-this-and-cant-seem-to-find-anything-thanks-for-the-help/

Rob

There are many different ways to make a scene4.lua. Here are a few:

  1. In your text editor create a new file and save it as scene4.lua. Of course it has to have the core scene code for it to be an actual scene.

  2. Download the scene template from the documentation (well Copy/Paste) https://docs.coronalabs.com/api/library/composer/index.html#scene-template into a new file and save it as scene-template.lua. Then in the future, you can just copy scene-template.lua to scene4.lua or scene5.lua, then edit it and add your changes.

  3. Copy an existing scene, such as scene3.lua to scene4.lua and modify scene4.lua with your changes.

As long as you’re starting with a valid scene file (writing it yourself, copy/pasting the template from the docs, repurposing and existing scene) then you should be able to go to that scene and have it work. Of course you’re responsible for your code in scene4 doing what it needs to do.

Finally a random suggestion, I don’t know what you’re scenes are, but it’s usually better to give them real names instead of scene1, scene2, etc. like menu.lua, gameover.lua, nextlevel.lua and so on, unless you’re telling a linear story where it makes sense to go from scene1 to scene2 to scene3, etc.

Rob

I just saw you have another thread where you asked the same question. Please only ask your question once. I’m going to lock this thread. Anyone wanting to respond, please do so here:

https://forums.coronalabs.com/topic/67610-how-do-i-add-a-scene4-to-composer-im-very-confused-on-this-and-cant-seem-to-find-anything-thanks-for-the-help/

Rob