How do I make sure a object is always on screenposition

Get help using Construct 2

Post » Wed Oct 07, 2015 9:38 am

Hi yall,

After using Construct 2 for a while i get wiser every day.

My game i am working on is full-screen and will never show borders ( i hope ).
It re sizes as the screens are different.

Though i am not sure if it is possible to put a object related to screen size.

I have a action button which i would like to have on the same position on whatever screen some one uses.

Lets say i want this button to the left bottom corner. But always at the same position lets say 16 px margin bottom and 16 px margin left.

Currently i'm using the anchor position and this works, but once the screen is a little more wide it will shift to the right.

The height works as i want it to work. This is also the perfect example. As you re size the screen the height of the button will always be on the same height.

Let me know if this is possible.

Thanks!
B
10
S
4
G
3
Posts: 165
Reputation: 2,511

Post » Wed Oct 07, 2015 10:21 am

Are you sure the object with the anchor-behaviour is on a layer with paralax 0,0?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 07, 2015 11:53 am

@LittleStain

Yep, i found that out the hard way ;).

The object itself is positioned great, Also when the camera scrolls it will stay at it's position. The only thing is if i resize my browser screen it will slide left or right ( only while resizing ).

I suck at explaining in text, let me show you the following image:
( Black things are screensizes )
Image
B
10
S
4
G
3
Posts: 165
Reputation: 2,511

Post » Wed Oct 07, 2015 12:34 pm

Are these the properties?

left edge : window left
top edge : window bottom
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Oct 07, 2015 1:39 pm

Nope it was not. It was set to nothing.

Trying that actually works :)! Only if the height will become to big it will stretch.
Though as far as i know there wont be any mobile / tablet screen that has a bigger height than width.

If it's the case i'm fine with this solution!

Thanks a lot!
B
10
S
4
G
3
Posts: 165
Reputation: 2,511

Post » Wed Oct 07, 2015 1:47 pm

All I did was visit the manual to get the answers:

manual on anchor behaviour
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: ChoosyZerk, jorgmaquoi, Yahoo [Bot] and 50 guests