How do I - Spread bullets apart until not overlapping

Get help using Construct 2

Post » Tue Aug 18, 2015 11:49 pm

Hello Hello. - Would anyone be so kind as to educate me on how I would achieve this effect?

- https://www.youtube.com/watch?v=hKCQsd8XPs0 - <---- Notice the way that the little units spawn out of the buildings neatly side by side? This is what I'm trying to achieve.

A straight up "This is how its done" would be appreciated it, but I wouldn't mind a hint in the right direction

At the moment my units kind of just cluster all over each other and it makes it difficult to see how many are coming.

I can't wrap my head around how I would get overlapping units to slowly spread away from each other until they are not overlapping anymore, and continue their trajectory.

how do I tell the sprite to move away to the side that its closest to? (So it doesn't go 100 pixels to the right, when 10 pixels to the left would have accomplished it)

I don't know the proper string to type in to do something so dynamic. The best I could come up with was

"-1x, -1y"
repeat until not overlapping.

But that would cause issues if the bullets were heading towards that direction anyway and it would just accelerate them awkwardly.

------

I think what I need is a way to spawn my bullets but in a spread pattern that they don't collide with each other.

If anyone could point me towards a tutorial that handles something like this, would greatly appreciate it.

Anything I found was relating to setting bullet angle to random to simulate shotgun spread, but that won't work so well for me.

Thanks in advance guys.
B
6
S
2
Posts: 60
Reputation: 1,242

Return to How do I....?

Who is online

Users browsing this forum: max2612 and 6 guests