How do I create a "main function"?

Just started using Construct 2? Post your questions here

Post » Fri Apr 03, 2015 2:24 pm

Hi guys, I know this is a beginner question but I wasn't really able to find what I was looking for by googling or searching this forum or tutorials.

So I now have the central part of the game done and I thought it would have been able to jam all of that into one main function and call that in every level, i.e. only have the level design in every level events tab. But I noticed that it was not possible to put a lot of the events into a function. So my question is really: Is copying all "main events" to the event sheet of every specific level really the easiest way to do it? Or is there a more effective way? Perhaps there is a way to do it by making the hero global? Any help on the matter would be really appreciated.

I also read this tutorial:
https://www.scirra.com/tutorials/823/creating-function
so I can see it's pretty easy to implement a separate function sheet where you can have enemy behaviour functions etc. but it would have been sweet to be able to have only ONE main function, 'cause otherwise if there's a change in the central game mechanics later, I have to make the changes in 50 level-event sheets.
B
4
Posts: 12
Reputation: 263

Post » Fri Apr 03, 2015 3:05 pm

You can include one event sheet in another.
B
55
S
28
G
18
Posts: 1,520
Reputation: 25,285

Post » Fri Apr 03, 2015 10:28 pm

Cool, thanks for the tip man!
B
4
Posts: 12
Reputation: 263



Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests