I really need practical advice on how to make a player character be able to hit, damage, and eventually kill a foe character, and vice versa, using either a sword or a fist.
I created a player character that I can move around in a 3D environment. I created it so that if I press the space bar, he will punch forward with his fist.
I have it set up where if the player character gets within a certain distance of a foe, the foe will turn toward the player character, and try swinging a sword or swiping with its arm like a punch toward the player character, depending on who the foe is.
I figured out how to make a wizard that shoots energy balls toward the player character, damages him, and kills him. But I cannot get a sword or fist to do the same.
Does anyone have some sword-fighting or fist-fighting code they can share that is tested and works, and accomplishes this?
Last edited by Ruben; 04/20/13 05:53.