How to drop and object on grid?

Get help using Construct 2

Post » Thu Dec 05, 2013 2:47 pm

It is bound to my mouse, then i click and it have to fill a place on the grid. How?
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Thu Dec 05, 2013 3:48 pm

do you mean how to make an object snap to grid?

if so you can do:
set object x to round(object.x/8)*8

and replace 8 with whatever gridsize you want, or a variable
do the same for Y
if your hotspot is in the top left corner, use int() instead of round()
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Thu Dec 05, 2013 4:18 pm

Done it, thanks. Also boolean variable solved lots of issues.
B
7
S
3
G
1
Posts: 154
Reputation: 1,812


Return to How do I....?

Who is online

Users browsing this forum: bluesun66, Kenthria, Malhog, plinkie and 1 guest