Game Development Community

Running & damage with animations

by Joel Hargarten · in Artist Corner · 07/03/2005 (7:06 pm) · 2 replies

Hey,
I am new to all of this, but so far I have a character and can create my own animations that work and I can play them. I replaced the 'salute' animation with my own and it plays fine, but I have a couple questions.

1.) how do I get the animation to play while 'running' around.
I can do this when I use the mouse button to play the animation, but need to be able to do it with other keys.
2.) how do I make it so that it does damage. again, it does this when I use the animation with the mouseFire button.

Thanks.

#1
07/06/2005 (8:28 am)
OK, let me try to explain this better. I set my player up with a sword 'hand to hand system' using the melee tutorial and everything works like it should. I created a new animation in MAX and replaced the default 'salute' animation with my new one, it plays fine. Now that I have done that, how do I make it so that it applys damage when it comes in contact with my AI player. Is there a function I need to call or what? I'm a little confused on how I would call it because the animation is used by binding it to a key in the client folder, but all of the damage calculation is done in the server. Or maybe if someone has a better way to do this, let me know. But lets get a reply this time. Thanks.
#2
07/06/2005 (9:16 am)
Ive never done damage, but its rather involved. its a little more complicated than just calling a function. you need to define a system for applying damage, a system for detecting when damage should be applied, and what happens when the player dies.

take a look at fps/server/scripts/player.cs and
fps/server/scripts/shapebase.cs to see how damage can be processed on the player object and look at fps/server/scripts/crossbow.cs to see how damage is dealt out. you may also want to look at radiusdamage.cs. study these files until you can understand whats going on.