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.
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.
#2
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.
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.
Torque Owner Joel Hargarten