How do I add layout height in events?

Get help using Construct 2

Post » Mon Sep 25, 2017 2:46 pm

for example when ball falls from top to down and its outside layout height of layout should double

On start layout size is 480x854
when ball is outside layout add to height 854
B
10
S
2
Posts: 38
Reputation: 707

Post » Mon Sep 25, 2017 2:48 pm

As far as I know, you can't set Layout Height dynamically...
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
2
Posts: 534
Reputation: 3,235

Post » Mon Sep 25, 2017 2:55 pm

i dont see anything like that in events options, only set canvas size but dont work
B
10
S
2
Posts: 38
Reputation: 707

Post » Mon Sep 25, 2017 2:58 pm

Image
B
55
S
24
G
13
Posts: 766
Reputation: 12,573

Post » Mon Sep 25, 2017 3:06 pm

Anonnymitet wrote:Image

why when i try use
WindowHeidh x2
and also try
layoutHeight x2

always my window is grows not game area
B
10
S
2
Posts: 38
Reputation: 707

Post » Mon Sep 25, 2017 3:12 pm

B
10
S
2
Posts: 38
Reputation: 707

Post » Mon Sep 25, 2017 3:25 pm

What is the game about? Not really sure what you are trying to achieve. Do you just want your ball to fall and the player avoids obstacles?
B
55
S
24
G
13
Posts: 766
Reputation: 12,573

Post » Mon Sep 25, 2017 3:33 pm

From the Construct manual:
"Set canvas size
Set the size of the canvas area in the page, if appearing inline to the page (i.e. a fullscreen mode is not used). If a fullscreen mode is in use, this effectively changes the size of the Window size project property, which adjusts the size of the viewport."

As I said before, you can't set layout size dynamically. You are mixing Layout and Viewport/Window. These are two different things. Imagine your construct app/game as something you look through an actual window:

Code: Select all
     +--------------------------------+
    /             B                  /
   /          +--------+            /
  /          /   A    /            /
 /          +--------+            /
+--------------------------------+


B is the full Layout, A is the Window through which you see the Layout. As far as I know you can set the window size dynamically, using set canvas size, but not the layout size.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
2
Posts: 534
Reputation: 3,235

Post » Mon Sep 25, 2017 3:37 pm

brunopalermo wrote:From the Construct manual:
"Set canvas size
Set the size of the canvas area in the page, if appearing inline to the page (i.e. a fullscreen mode is not used). If a fullscreen mode is in use, this effectively changes the size of the Window size project property, which adjusts the size of the viewport."

As I said before, you can't set layout size dynamically. You are mixing Layout and Viewport/Window. These are two different things. Imagine your construct app/game as something you look through an actual window:

Code: Select all
     +--------------------------------+
    /             B                  /
   /          +--------+            /
  /          /   A    /            /
 /          +--------+            /
+--------------------------------+


B is the full Layout, A is the Window through which you see the Layout. As far as I know you can set the window size dynamically, using set canvas size, but not the layout size.



i see, its not possible set bigger 'B' area? poor c2;/
B
10
S
2
Posts: 38
Reputation: 707

Post » Mon Sep 25, 2017 4:11 pm

maxwell88 wrote:i see, its not possible set bigger 'B' area? poor c2;/


Not dynamically. But, in general, the thing you want to do by increasing the layout size can probably be done in another way. If we had more info on that we might find a solution. :)
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
19
S
5
G
2
Posts: 534
Reputation: 3,235


Return to How do I....?

Who is online

Users browsing this forum: Darknessed, FabianB and 46 guests