Viewport location

Discussion and feedback on Construct 2

Post » Sat Jul 12, 2014 4:09 am

Is the view port (dotted line) always locked to the top left of the layout or can I center the view port so that I have margins on both the left and right of the viewable screen? I want a bullet behavior to spawn from either side of the layout off-screen, but to be destroyed once leaving the layout.
Posts: 28
Reputation: 404

Post » Sat Jul 12, 2014 7:50 am

Use conditions that check when the bullets exceed a certain X value for both the left and the right sides of the layout. Then spawn your bullets from a point that is a little less than that threshold.

For example:

when "Bullet" X > 1300
when "Bullet" X < -20 --------------> "Bullet" Destroy.

Those values are for a layout with 1280 width. If you create your bullets from -10 and 1290 you should be ok.
composer - multimedia artist
Posts: 1,146
Reputation: 10,379

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests