Global Variables not working properly?

Get help using Construct 2

Post » Wed May 11, 2016 10:12 pm

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?
Last edited by General J on Wed May 11, 2016 10:14 pm, edited 1 time in total.
B
20
S
5
Posts: 108
Reputation: 1,473

Post » Wed May 11, 2016 10:14 pm

would need the capx to help better.
B
42
S
17
G
8
Posts: 494
Reputation: 8,308

Post » Wed May 11, 2016 10:21 pm

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.
B
20
S
5
Posts: 108
Reputation: 1,473

Post » Wed May 11, 2016 11:57 pm

Dont be embarrassed, happens to everyone.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: Rhindon, YoHoho and 22 guests