How do I prevent enemies overlap each other using pathfinder

Get help using Construct 2

Post » Wed Sep 23, 2015 5:20 pm

B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Fri Sep 25, 2015 4:49 pm

R0J0hound wrote:https://www.scirra.com/forum/viewtopic.php?f=147&t=161333&p=978390#p978390


It's nice. Thanks! :)
Although, in your example, you are using an specific object and comparing with a family. Could you do the same but having just one family with several different objects? Because when you start to have several objects, pointing them specifically is not an option anymore. That's why I wanted to have one family (called Enemies for example) with several objects (ObjEnemy1, ObjEnemy2, ObjEnemy3....). The major problem is to get the objects of this family that is overlapping each other in a automatically way.
B
59
S
21
G
3
Posts: 604
Reputation: 6,691

Post » Fri Sep 25, 2015 7:43 pm

@kossglobal
For that you could create two different families with the same object types in them.
B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Fri Sep 25, 2015 7:51 pm

R0J0hound wrote:@kossglobal
For that you could create two different families with the same object types in them.


That's a tricky way to use families lol. But just adding the condition Family1.UID =/= Family2.UID would prevent from getting the same instance/object? I will test it. Thanks R0J0.
B
59
S
21
G
3
Posts: 604
Reputation: 6,691

Post » Fri Sep 25, 2015 7:57 pm

@kossglobal
Yeah, that should do it.
B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Fri Sep 25, 2015 9:45 pm

@R0J0hound

Works nicely. Thanks!
B
59
S
21
G
3
Posts: 604
Reputation: 6,691

Previous

Return to How do I....?

Who is online

Users browsing this forum: Tibolli and 13 guests