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
66
S
23
G
11
Posts: 452
Reputation: 12,077

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
92
S
31
G
24
Posts: 3,191
Reputation: 32,669

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
66
S
23
G
11
Posts: 452
Reputation: 12,077


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests