Animation interaction with Objects

Get help using Construct 2

Post » Mon Sep 09, 2013 2:26 am

Guys hi,
I have been working on medieval style game and i stucked at that point. My game character is attacking with his axe but i couldnt figure out how can i interact animation with other gameobjects. I mean character swing his axe and hit someone but how can i code that like axe on collision with enemy i couldnt figure out please help me.
B
4
S
1
Posts: 46
Reputation: 519

Post » Mon Sep 09, 2013 3:11 am

Something like when player is in axe animation + on collision with enemy then do damage?
B
47
S
17
G
82
Posts: 2,231
Reputation: 48,609

Post » Mon Sep 09, 2013 12:51 pm

Yeah. When player is in axe animation if enemy hits axe he is got to take damage.




I want enemy to take damage if hits axe not player is it possible ?BlazerGlazer2013-09-09 12:53:55
B
4
S
1
Posts: 46
Reputation: 519

Post » Mon Sep 09, 2013 1:01 pm

Ofcourse it is possible.

One of the ways to do this is to have an imagepoint on the axe and spawn an invisible axe-collision sprite when attack animation is playing at that imagepoint and deduct health from your enemy when the axe-collision sprite collides with the enemy.
Dont forget to destroy the collision sprite on attack animation end.

There are more ways to do it, but as this one is probably the most easy to understand, I offer this one.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Sep 09, 2013 1:12 pm

Thanks a lot man it worked well :)
B
4
S
1
Posts: 46
Reputation: 519


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 29 guests