Can't change layouts?

For questions about using Classic.

Post » Mon Feb 16, 2009 7:24 pm

You shouldn't have to place a new M&K object in any frames if you have a global one you want to use.

Also, you shouldn't have to place the global one either. It should just already be available for use from the event sheet editor.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Feb 16, 2009 7:52 pm

You can place a global object on the first layout and use it anywhere. In the next build, a bug with "run layout" where it would not create these global objects is fixed.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Feb 16, 2009 7:55 pm

I think it's all messed up. Which is unfortunate, because if there's no solution then I'll have to figure out how to transfer all my code to a new .cap and I've noticed that copying events between .caps usually doesn't work.

But shouldn't I have to place a MouseKeyboard somewhere in the game initially in order to make it global? I can't just go and start a new application and see the MouseKeyboard already available to use-- I just tried it.

Unless you meant after the inital placement, in which case I don't think the object realizes it's global. Because it will not function in any layout in which I can't see it in the object list in the layout editor. And I don't except in my initial gameplay frame I made and placed the MouseKeyboard object in to start.

update: ok I was about to post this and another reply popped up, which I'll now cover.
It's not really a problem with "run layout" because it doesn't do anything in "run all" either.
Now is the issue that I placed my global MouseKeyboard in the second layout of the app to start? I had been messing around and didn't need the keyboard input yet, so I didn't place it, but then did and made it global in the second layout where the game is.
B
8
S
3
G
5
Posts: 72
Reputation: 1,774

Post » Mon Feb 16, 2009 10:36 pm

You should put it on the first layout because
- the next build's Run Layout option creates global objects only from the first layout so it'll only work this way
- a global object placed on layout 2 does not exist until you visit layout 2 for the first time. ie. events using that object in layout 1 won't work, because the object is not yet created.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Feb 16, 2009 11:57 pm

OK then. I'll just have to place a new global one in the first layout and redo the events to point to it, then delete the other.

This should probably be clarified somewhere in the documentation so nobody else makes such a mistake. I didn't see anything about it.

Thanks for your help!
B
8
S
3
G
5
Posts: 72
Reputation: 1,774

Post » Tue Feb 17, 2009 12:33 am

You could copy and paste the object from the second layout to the first layout, then delete the original, using the object bar. Same events, and object is on first layout :P
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Feb 17, 2009 12:45 am

I had thought you couldn't do that because right-clicking on an object without a physical representation in the layout (XAudio2, MouseKeyboard, etc.) didn't give me a copy option. However I just now discovered the good ol' Ctrl+C/Ctrl+V will do the trick. Thanks again!
B
8
S
3
G
5
Posts: 72
Reputation: 1,774

Post » Tue Feb 17, 2009 12:49 am

Oops, I don't know where those menu options went!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests

cron