Match 3

Get help using Construct 2

Post » Wed Feb 15, 2012 10:11 pm

Good evening everybody,

has anybody a good idea to check for 3 matching sprites of the same type that have collisions with each other?

It is no problem to check for 2, but for example if you have already placed two sprites of the same that have no collision and next place a sprite in the middle with connection to both... how can I check that there is a connection of 3?

Sorry for my bad english, I hope someone can help me. The goal is a connect 3 game, like there are many in the web, but non in Construct 2.

Please help^^

StefanKuschelbauch2012-02-15 22:13:27
B
5
S
1
G
3
Posts: 46
Reputation: 1,581

Post » Wed Feb 15, 2012 10:38 pm

Instead of collisions, you could check the coordinates of the sprites.
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Wed Feb 15, 2012 11:15 pm

or overlapping.
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Wed Feb 15, 2012 11:59 pm

hello again,

this is understood... but these two things only check if there is a collision or not. they dont tell me if 3 sprites are connected/matching...

this was my question!

stefan
B
5
S
1
G
3
Posts: 46
Reputation: 1,581

Post » Thu Feb 16, 2012 1:56 am

Have you looked at PixelRebirth's tutorial? It's for CC but it might give you some ideas.

A basic Puzzle example (Now it even swaps back!)
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Thu Feb 16, 2012 2:26 am

[QUOTE=TELLES0808] or overlapping.[/QUOTE]
Actually overlapping should work well in C2.
The way its set up now, sprites that are directly next to each other, with collisions set to bounding box, are overlapping.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Thu Feb 16, 2012 9:43 am

Thx to Wink,

good Idea to look into CC... Is there also a one for C2? I didnt found it...

Stefan
B
5
S
1
G
3
Posts: 46
Reputation: 1,581

Post » Thu Feb 16, 2012 10:52 am

@PixelRebirth started it on the blog We Construct.
Harass him to get the other parts written. ^^Kyatric2012-02-16 10:53:07
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791


Return to How do I....?

Who is online

Users browsing this forum: GUN and 15 guests