Sign in to follow this  

Combat animation and reaction....?

This topic is 3473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a basic single player rpg, and need some help figuring out the timing between playing an attack animation and the take damage animation. As it stands my system uses something like an action que. So if player1 was attacking player2, it would something like: actionQue.add(new attack[0](player1, player2)); This obviously creates a new attack[0] object which begins the attack[0] animation for player1. Now what I am having a hard time with, is how do I determine when the player2 decides to play the 'gotHit' animation. Do I just look at the 2 second animation and figure out that at about 1.3 seconds into the animation, if the player2 got hit, then to play the 'gotHit' animation? Or is there a more desireable way to code this? What about the whole sound sequence? I would probably determine if the attack landed or not, then play either a 'squish' or 'ching' or 'woosh' sound depending on what happened, but how would I time this with my 'gotHit' 'blocked' or 'missed' animaitons? It doesn't seem very effecient to me to have to tailor these times specifically to each animaiton and attack. There has to be a more generic way to accomplish the effect.

Share this post


Link to post
Share on other sites
In our game, we basicly use a fancy tool to mock up timelines for each animation. The timelines have events on them at specific times, and sounds are triggered
off that. Likewise damage checks are triggered off the timeline, and if the damage function returns that it hit something a new sound is triggered then, and the target sent into it's "Get Hit" animation. It is all tied to the animations, nothing "generic" about it.

Share this post


Link to post
Share on other sites
Ahh ok, that was a simple enough concept. :p

I think I can do something like that in the program I am using too, so this is a great way to do it.

So in the end, it is pretty much tailored to the animation, for each animation. Thanks for the help.

Share this post


Link to post
Share on other sites

This topic is 3473 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this