Layout and same code sheet.

Get help using Construct 2

Post » Mon Jan 09, 2012 10:50 pm

Okay, I'm having a problem with 2 layouts with the same code sheet;

I use the action "Go to Layout Game 2" and then I set "Layer 1 set Visible"
But the Layer 1 set visible seems to only work for the past Layout.

1-Is there a way to remove a layout to obey a code sheet. Isn't "Go to Layout" supposed to do the job?

2-Ah friend of mine was trying to play my game. Several friends got it working, but this one got a bug. There is one layer, where the tiled background + some sprites dissapears. But other sprites on the same layout still there.

3-This one I got some clues. I want to add some logo (like scirra logo) on bottom of my game screen. How do I do that ? HTML index editing?
And also wanted to set my layout screen to start on center of the page, and not on top-left corner. I guess those are HTML issues.

Thx for the answer over the other topic. Forum is highly active.
B
5
S
1
G
2
Posts: 44
Reputation: 1,465

Post » Mon Jan 09, 2012 11:18 pm

1, not sure unless I see a capx or printscreen of some code.

2, it's probably to do with his computer not having updated graphica drivers or something.

3, yeah HTML pretty simple, I'll post an example in the morning.
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Mon Jan 09, 2012 11:22 pm

1) A layout is set to work with an event sheet. You can see in the layout properties the Event sheet property that allow you to chose the event sheet that will be executed for the current layout.
If both layouts have the same event sheet, then you have set their event sheet property to use the same event sheet.
Check it out because creating a layout without event sheet set this property to (none) by default.
2) He has to update its browser and graphic card drivers.
3 a) How to customize the exported html5 index.html
3 b) Set unbounded scrolling to yes in the layout properties if you are using the fullscreen modes. Else it may indeed be a matter of HTML.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Post » Mon Jan 09, 2012 11:32 pm

Center thing was answered over other topic.
Just select the "Unbounded scrolling".

Here's the part of the code.
When I trigger the end sprite. I still can see the old layout for some seconds, then it turn all to black screen.
I Know this goes to the Layout Game 2. All of Game 2 layers are invisible,but it shouldn't,as I set Layer Level(1) to be Visible.

B
5
S
1
G
2
Posts: 44
Reputation: 1,465

Post » Mon Jan 09, 2012 11:38 pm

oh damn, the crazy guy with levels in layers :D

hmmm I think in event 12 all the thing you do on layers after the 'Go to layout "Game"&Game_Layout' won't be taken into account after you change layout.
But I can't help more, you're capx isn't easy to understand
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 09, 2012 11:40 pm

[QUOTE=Kyatric] 1) A layout is set to work with an event sheet. You can see in the layout properties the Event sheet property that allow you to chose the event sheet that will be executed for the current layout.
If both layouts have the same event sheet, then you have set their event sheet property to use the same event sheet.
Check it out because creating a layout without event sheet set this property to (none) by default.
2) He has to update its browser and graphic card drivers.
3 a) How to customize the exported html5 index.html
3 b) Set unbounded scrolling to yes in the layout properties if you are using the fullscreen modes. Else it may indeed be a matter of HTML.[/QUOTE]

Thx.
And both layouts were already set to share the same event sheet.
The problem is that, Going to one layout, and trying to manipulate it's layers doesn't happen.
B
5
S
1
G
2
Posts: 44
Reputation: 1,465

Post » Mon Jan 09, 2012 11:46 pm

[QUOTE=Yann] oh damn, the crazy guy with levels in layers :D

hmmm I think in event 12 all the thing you do on layers after the 'Go to layout "Game"&Game_Layout' won't be taken into account after you change layout.
But I can't help more, you're capx isn't easy to understand[/QUOTE]

They are taken, because I hear the Sound.
B
5
S
1
G
2
Posts: 44
Reputation: 1,465

Post » Mon Jan 09, 2012 11:50 pm

It does.

But the code has to be in "Start of layout" to work of course.
As it is screenshoted, you go to a next layer, and keep executing actions on the previous layer/layout.

The logic of execution is wrong, you should organize your code differently. Good luck ^^

Kyatric2012-01-09 23:51:16
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Post » Tue Jan 10, 2012 12:05 am

[QUOTE=Kyatric] It does.

But the code has to be in "Start of layout" to work of course.
As it is screenshoted, you go to a next layer, and keep executing actions on the previous layer/layout.

The logic of execution is wrong, you should organize your code differently. Good luck ^^

[/QUOTE]

Yeah, now this works:
B
5
S
1
G
2
Posts: 44
Reputation: 1,465

Post » Tue Jan 10, 2012 12:24 am

Congratulations
Your event sheet won also a bit of clearness it seems. A few actions disappeared, that's always good
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,786

Next

Return to How do I....?

Who is online

Users browsing this forum: plinkie and 15 guests