Random tiles / editor?

For questions about using Classic.

Post » Mon Dec 27, 2010 12:18 am

I'm trying to figure out the easiest way to create a random level (much like the dungeon creator. That part is easy) but with the ability to have the mouse "snap" to each piece

I'm looking to create somewhat of a level editor, where I can place different blocks down. It doesn't seem too difficult, but the in game snapping idea has me baffled. I'm sure its very simple to do, but the method escapes me
B
4
G
3
Posts: 36
Reputation: 997

Post » Mon Dec 27, 2010 12:23 am

This is what I use for grid snapping:
x=int(x/16)*16
y=int(y/16)*16

You can change 16 to whatever grid size you want.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Post » Mon Dec 27, 2010 12:28 am

Perfect my friend, perfect

Works like a charm. Thanks :)
B
4
G
3
Posts: 36
Reputation: 997


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests