Grid position relatively to tiled background

Get help using Construct 2

Post » Sat Oct 06, 2012 4:23 pm

Hey guys, I have some problem here.

I want make this:
When I'm click on some sprite (in the center) system will create 4 colored blocks on x + 40 and y + 40 of this sprite.

Like that:


So it's easy, but not optimised. I need create sprites everywhere in my layout. More convenient to do this by using Tiled Background, but I can't detect position, where to create this colored blocks.

I tried to do this by using round(mouse.x/40)*40-20 but it's creating in different positions and not always in the way I wanted to.

Help me 3:
B
37
S
15
G
6
Posts: 238
Reputation: 7,735

Post » Sat Oct 06, 2012 8:34 pm

Something like this?

SpawnAroundGrid.capx (r105)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Oct 07, 2012 11:13 am

[QUOTE=Nimtrix] Something like this?

SpawnAroundGrid.capx (r105)[/QUOTE]

Yeah, thanks.
B
37
S
15
G
6
Posts: 238
Reputation: 7,735


Return to How do I....?

Who is online

Users browsing this forum: Pandadoor, totoe, Zebbi and 15 guests