How do I Keep Sprites From Going Through Each Other

Just started using Construct 2? Post your questions here

Post » Wed Jan 27, 2016 11:19 pm

I'm working on a prototype that has multiple enemy sprites on screen. I can't figure out how to keep them from going through each other. How do I accomplish this?
B
187
S
103
G
7
Posts: 131
Reputation: 18,608

Post » Thu Jan 28, 2016 12:26 am

Add a solid behaviour
B
7
S
1
Posts: 93
Reputation: 632

Post » Thu Jan 28, 2016 5:19 pm

Depending on what your trying to accomplish simply adding a solid behavior probably won't work.
If your enemy pathfind or follow/chase player you might have to use something like this:
https://www.scirra.com/forum/how-do-i-stop-sprites-from-overlapping-each-other_t165432

For advanced topic follow the last post link to ROJOhounds example capx... powerfull stuff.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
60
S
15
G
8
Posts: 619
Reputation: 8,970

Post » Thu Jan 28, 2016 10:40 pm

chrisinfinger wrote:Depending on what your trying to accomplish simply adding a solid behavior probably won't work.
If your enemy pathfind or follow/chase player you might have to use something like this:
https://www.scirra.com/forum/how-do-i-stop-sprites-from-overlapping-each-other_t165432

For advanced topic follow the last post link to ROJOhounds example capx... powerfull stuff.


Oh, the irony of how I actually bookmarked that exact topic page however many days ago. And when I ask this question, someone links me directly to it :D Thanks again. Obviously I'm getting somewhere in my progress with developing prototypes.
B
187
S
103
G
7
Posts: 131
Reputation: 18,608

Post » Fri Jan 29, 2016 6:53 am

chrisinfinger wrote:Depending on what your trying to accomplish simply adding a solid behavior probably won't work.
If your enemy pathfind or follow/chase player you might have to use something like this:
https://www.scirra.com/forum/how-do-i-stop-sprites-from-overlapping-each-other_t165432

For advanced topic follow the last post link to ROJOhounds example capx... powerfull stuff.


Well, I tried the example... but I'm using the free version and that doesn't allow for the use of Families like the example. Is there a way to accomplish with the use of families?

I've looked over the example and I see how it works using the instance variables of distance and angle so I can see that using Families can do way more than I thought.
B
187
S
103
G
7
Posts: 131
Reputation: 18,608


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests