How do I make the player get hit by melee enemies?

Get help using Construct 2

Post » Thu Jun 16, 2016 6:52 pm

Hello,
I have a problem when the enemies attack the player using melee.
The problem is that using overlaping and inverting it doesn't work in this case because it is a horde of zombies and all of them should collide with one another and with the player.
Otherwise they would overlap one another. So how do I fix this problem when the enemies collide with the player and removing his health everytime he collides with them?
B
25
S
7
G
1
Posts: 201
Reputation: 2,532

Post » Thu Jun 16, 2016 6:57 pm

First thought, try using an invisible sprite to represent the attacks.
Mistakes were made.
B
60
S
30
G
134
Posts: 1,950
Reputation: 75,377

Post » Fri Jun 17, 2016 12:33 am

As oosyrag has said already, use an invisible sprite as an "attack area" - or you can use a few math things like; is overlapping at offset *and* is angled towards the player *and* is playing attack animation - things like that.

The most common way is to have some kind of sprite used as a "detector" object though.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
41
Posts: 3,032
Reputation: 30,999

Post » Fri Jun 17, 2016 3:04 am

You can set destroy to the zombie (optional) or just let it like that..
If the character still dont kill the zombie like he is on AFK ..
Let him be kill by them.. That`s a game...
Just make the character become solid and dont forget the collusion point (optional)
B
13
S
5
G
4
Posts: 119
Reputation: 3,353

Post » Mon Jun 20, 2016 10:51 am

@oosyrag really clever!

Thanks all! I fixed it! :)
Last edited by GSquadron on Mon Jun 20, 2016 2:08 pm, edited 1 time in total.
B
25
S
7
G
1
Posts: 201
Reputation: 2,532

Post » Mon Jun 20, 2016 12:05 pm

participate listened. Because experiencing the same thing.
B
2
Posts: 2
Reputation: 154


Return to How do I....?

Who is online

Users browsing this forum: MomaFugger, Proxymity and 9 guests