Event Sheet Persistency

  • 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

  • Whats a stage?

  • Whats a stage?

    Sorry, I should have said "Layout."

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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 ),

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

      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)

  • 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.

  • 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.

  • Thanks, 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)