Bound to layout on scale

Get help using Construct 2

Post » Mon Sep 03, 2012 8:07 pm

I have a draggable object in my game, and the object has the behavior 'Bound to layout' making it stay on screen when dragging over the edges.

I want my game to support multiple screen sizes and portable devices, so I've set the background layer to parallax(0,0) and added the anchor behavior (so that the background stretches over the whole screen when fullsized in scale mode). I also have some HUD buttons in each corner, anchored so that they stay in the corners when resizing/scaling.

However, the layout itself isn't stretched over the screen, so the draggable object is still bounded the the small layout (see image below, the blue area).

The red draggable object is bound to the blue area, but I would like it to be draggable over the whole screen (blue+green) but still be bounded by the edges.

I've tried adding solid edges manually, but then the draggable object would 'jump' over the edges when moving the mouse outside the edges, making the object disappear outside the screen.

What is the best way to make the draggable object bound to the screen? Something that works when the game is scaled.

Thank you!
B
20
S
5
G
4
Posts: 51
Reputation: 4,139

Post » Thu Sep 06, 2012 6:35 pm

I have tried different methods to make this work the way I want, but still no luck... does anyone know how this can be done? Or if it's even possible..?
B
20
S
5
G
4
Posts: 51
Reputation: 4,139


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 17 guests