Hi i am trying to optimize the game as much as i can. Now i have 20 levels with 20 event sheets. Is there a way to use only 1 event sheet for all of them.
For example If in Layout 1 , spawn my hero here, if in layout 2 spawn my hero there. And such things. But i could not find an condition called on layout 1 active or someting similar?
You could use a common layout for all the common stuff, and then outside of that have a spawn event that's unique to each?
If you click on the layout in the Project tab, the Properties tab shows the "Event sheet" used. You can change it there. Or, you can right click an event sheet and "Include event sheet" to include a common event sheet. That way you can have specific data per layout as well as any common functionality needed.
isn't there a way to have, multiple events sheets in one layout.
Or you say: events sheet, work on all layouts.
Or is that too demanding
thank you , i was already trying to do it this way , but what i wanted is , i have in each level different soundtrack. So i would have to create 20 event sheets just for the music. I thought it would be easier to create 1 event sheet for Music , and point each track to specific layout.
It would be great if there was a function On start of layout ( and add name of layout)
Develop games in your browser. Powerful, performant & highly capable.
Make a global variable to store what level you are on and compare that variable to what music to play. Variable don't reset till you tell them to.
So like on start of layout then sub event if level equal this stop anything playing and play this.
PhoenixNightly: thanks , maybe webstorage could be used as well? because i use a lot of variables and reset variables.
You can use the expression: System.LayoutName.
Thx black hornet wasn't sure it there was an option for as I am can't power up C2 right now. Since black hornet confirmed you can have the system look at the name of the layout that should do what you need.
If system.layout name equal this then stop all playing and play this.
thank you, i am bit strugling with it, would you be so kind and make little capx to see how it suposed to work, thank you
You can right click in empty space on an event sheet and select "Include Event Sheet", which will add another event sheet. In my project, each layout has it's own event sheet, but each individual event sheet includes the Common Events sheet.
Blackhornet: This is exactly what i needed , thank you for example.