How do I make an enemy collide with itself.

Get help using Construct 2

Post » Thu Apr 16, 2015 1:34 pm

Fireche wrote:
ErvinGamez wrote:
Fireche wrote:Hey, you simply use the platform behaviour combined with a solid behaviour. Check part 4 of my videos: Your idea of moving them apart is a bad idea.


It *kind of* works. It's just that sometimes they teleport around for some reason.


Try the condition: Overlapping by offset (5,5). This might fix the teleport problem. Let me know if it did! Or disable the Platform behaviour as soon as it detects a collision. I think that's actually the better solution for what you need.


Yeah, it didn't work :(
I'll just use one enemy but give it a higher rate of fire.
B
7
S
2
Posts: 22
Reputation: 577

Post » Thu Apr 16, 2015 2:35 pm

maybe use my solution but as soon as it detects a collision, you pin the object..i didnt try this but it might actually work ;)
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Thu Apr 16, 2015 4:50 pm

Here's a quick example to show how to stop them going into each other.. sure, they bounce off each other (and that's probably what you don't want) but it should give you an idea of how to use pick nth instance..

You can easily replace the collision with overlapping.

mutliple instances
B
15
S
5
G
7
Posts: 876
Reputation: 5,650

Post » Fri Apr 17, 2015 1:21 pm

There are 3 things needed:
Platform behavior (on enemies)
Solid behavior (on enemies)
a collision polygon larger than the actual enemy.

I made a quick capx example, you can get it here:
https://onedrive.live.com/redir?resid=C2D3604A25210B53!3504&authkey=!AG5beWa9UtR8lgs&ithint=file%2ccapx

Good luck.
B
29
S
10
G
10
Posts: 97
Reputation: 6,614

Post » Sat Apr 18, 2015 4:13 pm

Thanks guys, I'll try them all out later.
B
7
S
2
Posts: 22
Reputation: 577

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests