Getting mousex and mousey on a scaled layer

Get help using Construct 2

Post » Fri Feb 21, 2014 7:10 am

I am making a game where you can place tiles and the program takes mouse.x and mouse.y to know where to place them. But when the layer scale is lowered to zoom out the tiles are no longer placed where the mouse is clicked at. I've debugged and the coordinates for the mouse are correctly adjusted to the scale for that layer, but when the object is created it acts as if it were made at mouse.absolutex and y.
B
7
S
2
G
3
Posts: 139
Reputation: 2,331

Post » Fri Feb 21, 2014 8:05 am

mouse.x("layername") should work
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Feb 22, 2014 2:13 am

LittleStain wrote:mouse.x("layername") should work

yes it worked! thanks
B
7
S
2
G
3
Posts: 139
Reputation: 2,331


Return to How do I....?

Who is online

Users browsing this forum: Kin, ratboy3, takamoto, tinhofiel and 38 guests