I'm going bald because of this Global Variable

For questions about using Classic.

Post » Sun Aug 15, 2010 4:27 pm

I have 4 layouts, and a global variable named exactly "Layout Jump". The layouts are:

*Beginning

*Middle

*Power down

*Ending

When the "Power down" layout goes to the "Ending" layout, the global variable begins here and sets itself to '2' at Start of "Ending" layout. After the "Ending" layout finishes, the game restarts to the "Beginning" layout.

Now, I'm trying to do two things:

1. Make the "Power down" layout recognize that the Global variable value (using "Set Value") is '2' and then go back to the "Beginning" layout. My GV code in the "Power down" layout is:

Is global variable 'Layout Jump' equal to 2 -----> Go to Layout "Beginning"

... but it's ignoring this command.

2. Make the "Beginning" layout recognize that the Global variable value is '2' also, thus causing the program to skip the "Middle" layout and go straight to the "Power down" layout.

In a nuthsell, I only want the "Middle" and "Ending" layouts to play once and then never play again.

I've got several Global variables working perfectly right now, but this one has me pulling my hair out... please help me before I go completely bald!
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Sun Aug 15, 2010 7:35 pm

Ok, here are a few things to try.


Use debug all and watch the global variable to make sure it is being set when you want it to, and that it is holding over on the restart.

Set up an event isolated from the global variable to test that your level changing events are working.
On keyhit 1 - go to layout 'etc'.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Tue Aug 17, 2010 3:21 am

Thanks, Steven.

No dice though. Another Global variable that was running perfectly until I duplicated a layout is now broken also. It works fine in all the original layouts, but in the duplicated layouts it's dead and that's with every single part of the code and all objects copied and made global from the original layouts, too. Very, very strange.

Maybe it's all just .62 issues? My next project will be in the latest version of Construct, so hopefully if it's a bug it was solved some time ago.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Tue Aug 17, 2010 9:26 am

Is there any chance of having a look at a cap to try and help solve this one MrMiller?
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Thu Aug 19, 2010 1:27 am

Hey Steven,

I actually just bypassed the original issue by sticking with layout duplications. Not perfect, but presentable.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Thu Aug 19, 2010 5:45 pm

This sort of thing seems to crop up a lot when you duplicate layouts. I'm going to hazard a guess that there's an obscure bug there.
B
2
S
1
G
2
Posts: 48
Reputation: 896


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests