outside window

0 favourites
  • 3 posts
  • how do i expression when is outside window do something?

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

  • Try Construct 3

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

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

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