Problem changing starting layout [solved]

For questions about using Classic.

Post » Sat Mar 26, 2011 2:11 pm

Hi again!

Lately I have had a problem with layouts that I don't really understand, and I wanted to ask if there is something weird with the programming, or if it's a bug.

In my current project I have made a new "MainMenu" layout, which is supposed to be the menu screen that appears when the game loads up. The layout has only two things on it so far - a start game button and a quit button. The event sheet has no more than a "on click" event for each button, one that transport you to another layout, and one that quits the application.

When running that layout alone it works perfectly fine as it should.

But when I try to drag this MainMenu layout to the top of the list, so that it is the first layout to run when you select "Run all", the layout stops working. I can see the buttons, but nothing happens when I click any of them. If I drag it somewhere below again, it works normally on "Run layout".

I tried it duplicating it in this example cap:

http://dl.dropbox.com/u/11716886/test.cap

Run the layout with the yellow block alone, and it will take you to the other layout as it is supposed to. Put it on top of the list and "Run all" - it stops working :S

So... did I miss something? ^^;


(In my original .cap I also get a strange problem with objects from a completely different layout (the original "layout 1") showing up on my main menu when I put it on top. And the objects aren't even global, or have any related events in the event sheet! :S )
B
10
S
3
G
3
Posts: 110
Reputation: 2,206

Post » Sat Mar 26, 2011 2:33 pm

Copy the Mouse & Keyboard object from layout 1, and paste it to layout 2.
Or make it global from the first layout.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Mar 26, 2011 2:37 pm

So simple....

I had already made the object global, so I thought I was safe there. But copying it over made it work.

Thanks a lot :) *feels silly*
B
10
S
3
G
3
Posts: 110
Reputation: 2,206


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest