Does Every Layout Need its Own Event Sheet?

Discussion and feedback on Construct 2

Post » Sun Jun 16, 2013 7:37 am

whatsup everybody,

i need to know if every layer needs its own event sheet or can i incorperate existing event sheets to new Layers?RookieDev2013-06-16 11:42:36
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Jun 16, 2013 8:11 am

Yes, when you create it say no to "Create new event sheet" the select your layout in the project bar and on the properties bar on the left you should see a form name Event Sheet. Just select the one you want to use, like that you can use the same sheet for multiple layouts.
B
9
S
2
Posts: 20
Reputation: 1,385

Post » Sun Jun 16, 2013 8:40 am

@Billygoat Thanks man this information helps me out alot.I didnt want to go any further without knowing.thanks again
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Jun 16, 2013 11:06 am

Don't hesitate to also look into the include feature.

And just a correction, I guess you meant layout, not layers.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Sun Jun 16, 2013 11:41 am

@Kyatric Thanks,

That Include had me stumped yesterday,I did just figure that out not to long ago and it is awesome how it functions.I love how alot of the functions work on C2.This engine is a dream I just have so many questions about things.I also did mean Layouts im sorry about that,Im going to fix it right now.RookieDev2013-06-16 11:44:16
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Sun Jun 16, 2013 4:25 pm

Not only is it easier than writing an event sheet for each layout, but can make organizing better too.

For example, spread the game engine over a few different event sheets, all interaction with the player in one, all collisions in another, etc. Makes working one things easier.
Then make an event sheet for each layout level, with events specific to that level, and include the main game engine in that.

Other tips: Put all your global variables in one event sheet, since they are global, it won't have to be included in any other sheet.
You could also put all your functions in one sheet, (or two if you're function happy.)
B
231
S
62
G
33
Posts: 902
Reputation: 40,348

Post » Sun Jun 16, 2013 7:01 pm

Multiple event sheets and Include can make a world of difference in organizing and creating code for specific objects without accidentally messing with other events. I started using multiple sheets and includes and it's made things easier as I tend to make less mistakes.

Groups can do this and be disabled too but all included sheets within that group would still be active, which is a slight advantage but easily gotten around by putting everything in 1 sheet in a master group for that sheet and disable that on command.
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sun Jun 16, 2013 8:02 pm

@Paradox @Thndr Awesome info guys,Thanks for that extra tidbit.I was wondering at first if i had to create seperate sheets for every level and it just didnt make sense.But that was yesterday and this is today,I am way smarter today thanks to the community.Once again thanks guys for the feedback
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,378

Post » Tue Jun 18, 2013 5:01 pm

[QUOTE=Kyatric] Don't hesitate to also look into the include feature.

And just a correction, I guess you meant layout, not layers.[/QUOTE]


^-----this is super helpful. It adds a layer of abstraction. Really helpful.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239


Return to Construct 2 General

Who is online

Users browsing this forum: rbailey83 and 26 guests