How do I find Layoutwidth to set

0 favourites
  • 8 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • 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?


  • Layout.Width?

    Nevermind there is a LayoutWidth too.

    Are you sure it's not Compare Y>LayoutWidth

  • 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.

  • "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.

  • 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.


    also what he said

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

    But the second part is Player/Set X or Y rather

  • Thanks. I'm going to try later tonight.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)