Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Need Guide for Collision

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 21st Feb 2016 17:04 Edited at: 21st Feb 2016 17:32
Hi.

In my fighting game I have some attack animation (e.g: Knife animation). So I Need a good way to collide attack animation to enemy, but I should be very close to enemy for kill him.
Now I need best way for do this action without very close.

for better understand I attached a video file:

https://www.dropbox.com/s/f3la1a07v8eb32e/fight.wmv?dl=0

Thanks.
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Feb 2016 20:22 Edited at: 21st Feb 2016 20:23
Sorry for short response as I'm on mobile.

What I would do is calculate the distance and check what frame the animation frame is.

If dist < 3 and animation frame = dmg frame
Do dmg
Endif
Download My Games for Android. Made with AGK.
Jellyfish Dive- https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim
Brick Destroyer - https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_BrickDestroyer
Ping Bong - https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_Pong_Ping_Bong
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 22nd Feb 2016 05:49
Quote: "Sorry for short response as I'm on mobile. "


No Problem.

Quote: "What I would do is calculate the distance and check what frame the animation frame is.

If dist < 3 and animation frame = dmg frame
Do dmg
Endif"


Thanks, I think it's good idea.

Login to post a reply

Server time is: 2024-09-29 11:21:14
Your offset time is: 2024-09-29 11:21:14