[Solved] Carry some events across multiple sheets?

Get help using Construct 2

Post » Wed Apr 24, 2013 1:01 pm

Hiya

I am creating a level based game. I don't want to clone the (rather complex) interaction/touch events into each level's event sheet because that would mean I have to maintain code in many places going forwards - a logistical nightmare as any coder knows.

..Nor do I want each level to share one event sheet as it just isn't practical due to different game modes, tutorials, and different objects and backdrops to handle as the levels progress.

Is there any way at all that I can have some code be re-usable in all event sheets? I already have the code in question grouped up into an "interaction" group.silkc22013-04-24 13:06:08
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Wed Apr 24, 2013 1:04 pm

Put events in separate event sheet, right click on event sheet you want the events to appear in, and choose "Include event sheet".
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Apr 24, 2013 1:05 pm

Aha smashing! Is that a relatively new addition or have I been blind all this time?
B
20
S
6
G
2
Posts: 157
Reputation: 3,109

Post » Wed Apr 24, 2013 1:07 pm

[QUOTE=silkc2] Aha smashing! Is that a relatively new addition or have I been blind all this time?[/QUOTE]

I think it has been there for quite a while, not implying anything about your vision! :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Fri Jun 13, 2014 12:49 pm

Yes its a great Feature....

I tend to break down all my events into systems

so for each system in the game ..like
player controls
enemy ai
music systems
level generation
HUD events
Camera controls
etc

they all go on their own event sheet

it makes it soooo much easier to read and find where problems are..when debugging because then the debugger tells you exactly where the bug is :D happy joy

Build robust systems from well planned events and you have epic WIN :D
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
29
S
11
G
8
Posts: 313
Reputation: 7,335


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 21 guests