How do I find Layoutwidth to set

Just started using Construct 2? Post your questions here

Post » Wed Aug 31, 2016 12:40 am

I'm trying to follow the Moon Wolf tutorial from the book. It wants me to set the player as Set Y> Layoutwidth -20, but I can't find Layoutwidth in the event options. There is compare height and set Y, but that didn't work. I tried manually typing in it with - 20, but testing it still made the character either go off the screen or not move down at all. I need to do the same with X. Any suggestions?

Thanks
B
33
S
15
G
10
Posts: 95
Reputation: 7,672

Post » Wed Aug 31, 2016 1:04 am

Layout.Width?

Nevermind there is a LayoutWidth too.

Are you sure it's not Compare Y>LayoutWidth
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Wed Aug 31, 2016 2:54 am

The add event is: player (icon) Y (is greater or equal symbol) LayoutHeight - 20 (Assuming that's negative 20) then the action is Player Set Y to LayoutHeight - 20

Then the next event, is X instead of Y and replace height with width.
I tried the compare x and compare y events, but the ship still goes off screen when going right or down.

There is no LayoutHeight or LayoutWidth options.

My 2 events before them are just Set Y or Set X and those worked.

Was there an update that changed it to something different?

Thanks for your replying.
B
33
S
15
G
10
Posts: 95
Reputation: 7,672

Post » Wed Aug 31, 2016 3:10 am

"LayoutWidth" is a system expression that you have to type into the value box for Y. It's not something you can click to add.
B
61
S
33
G
109
Posts: 112
Reputation: 59,443

Post » Wed Aug 31, 2016 4:03 am

You can add behavior 'bound to layout' to ship and make bumpers(like four rails pool table edges) right outside the layout then add behavior 'solid'. It will keep anything 'bound to layout' in the layout.
Just example.capx I edited for what I think you need.
Image?

also what he said
Image

But I'm new sort of so I may not know/

But the second part is Player/Set X or Y rather
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Wed Aug 31, 2016 11:50 am

Thanks. I'm going to try later tonight.
B
33
S
15
G
10
Posts: 95
Reputation: 7,672

Post » Wed Aug 31, 2016 11:53 pm

Okay, thanks. I was able to type it in and it took. The ship still goes off the screen to the right and down. I tried making the background layout 800x480, like the book says. So I'm wondering if it's the Position number needs to be changed or the window the run layout doesn't quit fit the entire background borders.
B
33
S
15
G
10
Posts: 95
Reputation: 7,672

Post » Sat Apr 01, 2017 1:29 pm

@staleevolution,

Make sure your Layout size is equal to your Background object size, which in your case is 800-480.
Choose a layer which is bond to your Background pixel object and check its size. Then try again what R. Dillon suggest.

I hope it'd help.
B
3
Posts: 1
Reputation: 177


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest