How do I make a local variable change a included event sheet

0 favourites
  • 3 posts
From the Asset Store
"Easy Local Notifications" enhances games with customizable local notifications.
  • This is a puzzle game.

    I have multiple layouts for the same part of the game. "Layout Puzzle1, 2 ect..."

    Each Puzzle layout is essentially the same minus a change in 3 different sprites. One a fully animated, very complicated (for me as a new game maker) sprite. I mean the sprite is simple enough but it gets manipulated thru the event sheet very heavily.

    What I would "like" to do is create an event page for each Puzzle layout that uses all the events from the first sheet but lets me exchange one sprite for another.

    Puzzle Event sheet 2

    -------------------------------

    Include:Puzzle Event sheet 1

    but everytime sprite:apple appears in the sheet replace it with sprite:pear

    Puzzle Event sheet 3

    --------------------------------

    Include:Puzzle Event sheet 1

    but everytime sprite:apple appears in the sheet replace it with sprite:orange

    ect...

    I hope this makes sense. Is this possible thru a local variable? or something else that I am not thinking of?

    Edited to add:

    I have a really beautiful menu screen that lets you scroll thru the puzzles.

    Maybe there would be a way to configure it from there? So when Button1 is pressed it loads a Universal Puzzle layout which uses the Puzzle event sheet but changes the sprite that is used?

    or....is there a way to

    OnTouch Button1 | set global variable to Apple | go to layout Universal Puzzle

    the Universal Puzzle Layout would be linked to a Universal Puzzle Event Sheet

    and that sheet would check

    if global variable is set to Apple use event sheet apple

    if global variable is set to Orange use event sheet orange

    ect....

    Not sure if it is even possible and if it isn't possible to use a variable to replace one sprite with another that leads me to ask, which is more resource heavy, a game with 15 additional Layouts (that are almost exactly identical?) or a game with 15 additional event sheets (that have the exact same events minus a change in sprite names?)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From what I understand of your description, it sounds like families might be useful for you. Put all your sprite variations into one family, and have your events refer to the family.

  • Oh that is a thought. Haven't quite wrapped my head around families but that is because I am still using the free version and I don't believe you can use them yet. This is my first game with Construct and only the 2nd I have ever made. Wasn't planning on upgrading until I got closer to publishing it. Going to do some research on families. Might have to upgrade sooner.

    Thank you for the thought.

    Off to read more.

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