outside window

Get help using Construct 2

Post » Sun Apr 07, 2013 1:08 am

how do i expression when is outside window do something?
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Sun Apr 07, 2013 8:27 am

Event --->Sprite.X >/ viewportRight(0)
ACtion--->then do |something"

Event --->Sprite.X </ viewportLeft(0)
ACtion--->then do |something"

The "0" is layer and the viewport is pretty much your window view. When the sprite's x value is greater then viewportRight or in this case when sprite goes past the right border of your window then something will happen.

Same goes for the left border of your window as well. If sprite's x value is lower then the viewportLeft, or its going towards the left so its showing negative values, then something will happen.

viewportLeft is usually "0", while viewportRight is usually the window view on your browsers Width

>/ means greater then or equal to
</ means less then or equal toretrodude2013-04-07 08:31:54
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Sun Apr 07, 2013 8:29 am

If your confused then just post here and I'll see if I can help you out. Is there something more specific you want to do outside the layout?
B
18
S
4
G
3
Posts: 436
Reputation: 4,801


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 27 guests