Global Variables not working properly?

0 favourites
  • 4 posts
From the Asset Store
Globals 2.0
$3.99 USD
Globals 2.0 stores and group variables. You can also load and save data (variables) from/to JSON files.
  • I have a dialogue box system.

    Works like this:

    Global Variable: "charactername"

    Event trigger -> Play Animation: charactername&"_talk_idle"

    The idea is that every dialogue box portrait animation is in a single sprite object, and I can draw that object and play the animations for the appropriate characters. I can change the global variable to the character's name, and the way the animation names are set up it works itself from there.

    It already works in practice on a single-layout.

    Now the problem arrises when I get to the stage where I need to start making numerous different Layouts with Includes to the "core" event sheet.

    Every other aspect works perfectly in the 2nd layout (which is a duplicate of the first) and it's own event sheet is nothing but an include to the main event sheet. The main event sheet has an OnStart : Set Vale of charactername to "girl".

    For testing purposes I removed that OnStart event from the main and put it on the 2nd room's sheet. (These separate Layout sheets with includes to Main will function as the different "levels" and scripted events. Where the only variation are things like the layout of the level or scripted events.) Didn't work.

    It feels like the problem here is attributed to the Global Variable not functioning correctly. Anyone have any ideas? Am I understanding something wrong?

  • would need the capx to help better.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Mods close thread please. I have found the solution and it's embarrassing.

    Forgot to assign the second Layout's event sheet to the new bare one I made with the Include. Instead it was assigned to the main one. That's why things weren't assigning properly.

  • Dont be embarrassed, happens to everyone.

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