How do I Make sprites of the same instance stop overlapping?

Get help using Construct 2

Post » Thu Apr 06, 2017 2:19 pm

Ok, so i made a spawn building which is spawning 1 kind of sprite every 1 second. whenever theres 10 sprites in the spawn area they are all supposed to move onto another area. I marked this area x2400,y1200 (middle of the screen). But they all end up overlapping each other even though they have the solid behavoir.

How can i make them not overlap each other??
B
4
Posts: 5
Reputation: 210

Post » Thu Apr 06, 2017 2:24 pm

Most straight forward way is using families. Put the sprites in a family. On Sprite collide with family, push out Sprite with custom movement.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,697
Reputation: 64,442

Post » Thu Apr 06, 2017 2:28 pm

thanks for the quick fix. Its looks pretty glitchy when they collide though.
Its as if they are pushing each other around
B
4
Posts: 5
Reputation: 210

Post » Thu Apr 06, 2017 2:32 pm

Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
69
S
18
G
8
Posts: 639
Reputation: 9,549

Post » Thu Apr 06, 2017 2:38 pm

Hmm yeah that was off the top of my head. I know there are ways to implement it where they don't overlap at all, but I forget the details. Try a search.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,697
Reputation: 64,442

Post » Thu Apr 06, 2017 2:46 pm

oosyrag: I did a search, could only find years old content, with broken links. You way seems to have a HUGE impact on the performance.

chrisinfinger: Where do i find the .capx file? do i need to buy license?
B
4
Posts: 5
Reputation: 210

Post » Thu Apr 06, 2017 2:58 pm

Here is my favorite example, although I can't profess to understand how it works. r0j0-s-experiments_t91829?&hilit=Experiments

Regarding broken links - a recent change to Dropbox changed the way public links were handled. If you pm the poster they can usually update the share to get it working again.
Mistakes were made.
B
53
S
27
G
114
Posts: 1,697
Reputation: 64,442

Post » Thu Apr 06, 2017 3:14 pm

ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394

Post » Thu Apr 06, 2017 3:46 pm

i'll take a look at those osyrag. If i get to understand them, i'll try to make a simpler explanation
B
4
Posts: 5
Reputation: 210

Post » Thu Apr 06, 2017 3:50 pm

Mistakes were made.
B
53
S
27
G
114
Posts: 1,697
Reputation: 64,442

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 18 guests