How do I pin sprites to specific area of window

Get help using Construct 2

Post » Tue Oct 11, 2016 4:21 pm

Message: kab can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I am trying to place the "gas" and "break" sprite on the left and right on window.I want the button to stay on the windows as the vehicle move.Moreover is it possible to make those sprites display only when the game is being run on a mobile device?

Check my demo here-> https://www.dropbox.com/s/sejtue4q4wdrkdm/workingdemolatest.capx?dl=0

Thanks in advance....
B
5
S
1
Posts: 32
Reputation: 389

Post » Tue Oct 11, 2016 4:29 pm

Put them on the HUD layer and set the Parallax values for the layer to 0,0. There is a System expression: Is on mobile. Use that in On start of layout to do any specific work for mobile.
ImageImageImage
B
71
S
22
G
249
Posts: 3,763
Reputation: 138,577

Post » Tue Oct 11, 2016 5:04 pm

Thanks ...that was just what i needed
B
5
S
1
Posts: 32
Reputation: 389

Post » Wed Oct 12, 2016 9:36 am

I can't find the Is on mobile expression , i am using construct r233
B
5
S
1
Posts: 32
Reputation: 389

Post » Wed Oct 12, 2016 11:15 am

kab wrote:I am trying to place the "gas" and "break" sprite on the left and right on window.


In addition to being on a HUD layer with 0,0 parallax, you might want to give those Sprites the Anchor behaviour, so that they will maintain their position relative to the edge of the screen on different resolutions.

kab wrote:I can't find the Is on mobile expression , i am using construct r233

When adding the condition, double-click on System, scroll down to Special Conditions and you should find Is on mobile device there
Last edited by OddConfection on Wed Oct 12, 2016 3:43 pm, edited 1 time in total.
Find all the Construct 2 games that were on Steam Greenlight here
B
35
S
9
G
7
Posts: 468
Reputation: 6,866

Post » Wed Oct 12, 2016 1:36 pm

Got it ...Thx
B
5
S
1
Posts: 32
Reputation: 389


Return to How do I....?

Who is online

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