Event Sheet Persistency

Discussion and feedback on Construct 2

Post » Sat May 02, 2015 12:08 am

Hi all,

Not sure if anyone knows this for 100% certainty or not or if @Ashley can chime in, but do event sheets stay in memory after leaving the level they were in?

Example:

I have a "Generic Level" event sheet containing common level stuff.

I have a "Stage 1" event sheet for stage 1 containing stuff only relevant to that level (say a few lines of dialogue). It has an include for "Generic Level"

At the end of Stage 1 you go to Stage 2.

Stage 2 has a "Stage 2" event sheet. It has an include for "Generic Level"

So on for each stage of the game.



Question 1) Are the events for "Stage 1" still running on Stage 2?

Question 2) Do I need to include "Generic Level" in each Stage sheet or is one enough?

Question 3) If sheets are persistent then by Stage 10 does this mean it's looping through 11 event sheets every tick?

Thanks
B
31
S
6
G
1
Posts: 80
Reputation: 2,500

Post » Sat May 02, 2015 1:08 am

Whats a stage?
Image ImageImage
B
168
S
50
G
164
Posts: 8,228
Reputation: 105,575

Post » Sat May 02, 2015 1:29 am

newt wrote:Whats a stage?


Sorry, I should have said "Layout."
B
31
S
6
G
1
Posts: 80
Reputation: 2,500

Post » Sat May 02, 2015 2:02 am

An event sheet only works on a layout if you assign it to a layout.
You can have layouts with multiple event sheets, called event sheet includes, or you can have layouts with no event sheets at all.
Image ImageImage
B
168
S
50
G
164
Posts: 8,228
Reputation: 105,575

Post » Sat May 02, 2015 8:20 am

1) No.
2) You could just set "Generic level" as the event sheet property for a layout. Otherwise you always need to include it. Any sheets which are not included are not run (as per #1)
3) No.

You can test when events run pretty easily, by adding an event with an obvious effect (e.g. playing a sound) and seeing where it takes effect.
Scirra Founder
B
387
S
230
G
88
Posts: 24,249
Reputation: 192,450

Post » Sat May 02, 2015 9:48 am

Ashley wrote:2) You could just set "Generic level" as the event sheet property for a layout. Otherwise you always need to include it. Any sheets which are not included are not run (as per #1)

Hmm... I don't get it (beginner problem :D),

  • Every Layout may have / has it's own associated event sheet
  • Every event sheet can include other event sheets (the "global events" in @anubis666 example)

Is this correct?
Making Gobal Events the default sheet for a layout wouldn't then simpy prevent the events for this layout (Scene 1, scene 2...) from loading? Is there another way to organize code? (I have the same "problem" to organize the code for the progressive part of my game, the game and it's levels itself and a number of independent in-games)
B
7
S
2
Posts: 38
Reputation: 577

Post » Sat May 02, 2015 11:37 am

Ahh I figured out my problem.

I have a dictionary object holding dialogue which was persisting across layouts.

Didn't realize it was global by default!

Now i clear it every layout before adding the level's dialogue.
B
31
S
6
G
1
Posts: 80
Reputation: 2,500

Post » Sat May 02, 2015 11:55 am

@dripple by default you can create an event sheet for one layout, but you can also choose to use one event sheet in multiple layout, every layout has an "event sheet" propriety that says which event sheet is associated, one event sheet can be associated to multiple layouts.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
52
S
22
G
18
Posts: 2,122
Reputation: 17,093

Post » Sun May 03, 2015 7:06 am

Thanks, @Aphrodite. That's what I was aware about. I thought there might been different ways to assign sheets to a layout. But at the end, this looks like I was looking for.
B
7
S
2
Posts: 38
Reputation: 577


Return to Construct 2 General

Who is online

Users browsing this forum: glerikud, Yahoo [Bot] and 2 guests