Create a parallax component that relies on mouse

Get help using Construct 2

Post » Sat Dec 29, 2012 1:42 am

So, I'm in a bit of a pickle here. My project well best explain but basically I need a moving control component and it relies on the mouse. Problem is, I'm using parallax to make it move and that has coordinates than the other project. I can't modify the mouse to be a part of that layer (AFAIK). So what can I do?

Here's the project, note the function works.

https://dl.dropbox.com/u/44188718/Help/1hr.capx

Here's my attempt at making the stick move along with the player, notice it doesn't interpret the mouse correctly.

http://dl.dropbox.com/u/44188718/Help/2.capx

Thanks.

B
49
S
18
G
7
Posts: 429
Reputation: 8,893

Post » Sat Dec 29, 2012 3:09 am

Put the control objects on the UI layer, then instead of mouse.x and mouse.y, use mouse.x("UI") and mouse.y("UI").
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat Dec 29, 2012 5:02 pm

[QUOTE=sqiddster] Put the control objects on the UI layer, then instead of mouse.x and mouse.y, use mouse.x("UI") and mouse.y("UI").[/QUOTE]

Wow, such a simple solution thanks! I tend to over-analyse these things.
B
49
S
18
G
7
Posts: 429
Reputation: 8,893


Return to How do I....?

Who is online

Users browsing this forum: Pandadoor, Sotir31 and 26 guests