Fighting

I’m making a demo with 2 characters each with a weapon. I want one of them to hit the other with his sword for example.
But how can I compute the distance so the character can hit the second and what effect can I add to simulate that the hit succeeds ( and when because there’ll be many collision between the ennemy and the sword? )

You must create the envelope object for both fighters, envelope object must be simple but good fiting on the fighters, so you must compute colisions only for envelops(they are invincible), if you don’t know how to do colision detection, try http://nehe.gamedev.net