Construct 0.98.8 released (stable)

New releases and general discussions.

Post » Mon Mar 02, 2009 7:19 pm

No, that's not right... you should only need one global object on one layout, then it should appear everywhere...
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Mar 02, 2009 7:24 pm

That doesn't really make logical sense; if I have a global online object reading events from global objects, and I don't want it to in one layout, why should it have to? What about a global sprite? Where will it spawn in layouts it isn't placed?

I think it should need to be placed in every layout it'll be used in.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Mon Mar 02, 2009 7:26 pm

Indeed, I have a couple global objects on the first layout and I can access them anywhere.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Mar 02, 2009 7:27 pm

I meant event sheets like Deadeye said. Global objects are accessible via events in any event sheet in the application, and global objects are created when their layout is visited for the first time. So if you have a global object copied and pasted through layouts 1, 2 and 3, and you keep using 'next layout', by the 3rd layout you have 3 instances. However, global objects on the first layout are always created when you 'run layout' in Construct.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Mon Mar 02, 2009 8:05 pm

[quote="Ashley":va85spqx]No, that's not right... you should only need one global object on one layout, then it should appear everywhere...[/quote:va85spqx]

Yeah, I was gonna say... that seems to be how it's working for me.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Mar 02, 2009 8:31 pm

Just lemme clear this up, it makes sense now.

I thought if I set an object to global that it'll be loaded in globally whenever we start the runtime.

So I have a couple of layouts and created a new title screen, where I can let people set options, like full-screen, moBlur, save / load, etc.

I put that title screen on top of the level 1 layout. So the KeyboardMouse object was still on level 1, I just thought because it's set to global it'll be loaded anyway.

It didn't. Now I've cut and pasted the audio and keyboard events to the title screen layout and - boom - it works.

Not sure if that's the perfect way though. Wouldn't it make more sense to load the objects that are set to global to load them in any layout?
B
6
S
2
G
3
Posts: 520
Reputation: 2,690

Post » Mon Mar 02, 2009 8:41 pm

You only need one global mouse&keyboard, just put it onto the first layout and you're set for the rest of game.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Mar 03, 2009 9:31 am

global objects never show in new layouts that i create. i can still use them for new events but there is nothing in the objects window.
B
2
G
3
Posts: 17
Reputation: 884

Post » Tue Mar 03, 2009 9:49 am

For non-layout objects, you don't really need them in the layout. Events are where they are exclusively used. For layout objects (sprite, tiled background), they will be there even if you cannot select them in a different layout. You can reposition them with events (on Start of layout, for example). If you want to change them, go back to their layout and edit them there.

There is NO need to copy global objects; it just creates multiple instances that conflict each other.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Mar 03, 2009 9:52 am

[quote="Mipey":1wpmiw8h]For non-layout objects, you don't really need them in the layout. Events are where they are exclusively used. For layout objects (sprite, tiled background), they will be there even if you cannot select them in a different layout. You can reposition them with events (on Start of layout, for example). If you want to change them, go back to their layout and edit them there.

There is NO need to copy global objects; it just creates multiple instances that conflict each other.[/quote:1wpmiw8h]
sorry, i meant to say that when i make an object global it does not show up in the object window of new layouts. i realize that their is no need to have the keyboard input show up on the objects window.
B
2
G
3
Posts: 17
Reputation: 884

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest