collision & overlapping

Get help using Construct 2

Post » Mon Jul 23, 2012 12:49 am

I'm having a problem with collision in my game. The player attacks the enemy with his sword, taking out the enemy's hit points. The problem is when the player makes others attacks, where the method "on collision" doesn't recognize the hit.

If I use the "is overlapping" method, a single attack instantly kills the enemy, because Construct thinks I hit the enemy several times.
B
37
S
8
G
4
Posts: 85
Reputation: 5,099

Post » Mon Jul 23, 2012 7:50 am

You could try using a System Trigger once while true Event to only work on the first collision, or toggle a boolean on the first collision Event to trigger a short "unhittable" phase while the enemy is hurt.

But we'll need more information to figure out why other attacks' collisions don't work. What kinds of attacks are they?
B
19
S
5
G
1
Posts: 104
Reputation: 2,920

Post » Mon Jul 23, 2012 11:46 pm

When using the "is overlapping" be sure to make it only trigger once. While overlapping, it is triggering for every tick in the game. I've ran into that same problem and making it "trigger once" fixes all your problems :)
B
2
Posts: 4
Reputation: 258

Post » Tue Jul 24, 2012 1:04 am

Thanks friends, this capx helped me in :) When I needed more playable, I'll post the link ....


https://www.dropbox.com/s/2m0nzrza15d2zr1/Beatemup0.1%20May5%20Build.capx
B
37
S
8
G
4
Posts: 85
Reputation: 5,099


Return to How do I....?

Who is online

Users browsing this forum: GSquadron and 26 guests