When you guys make platform games with swords or punching or kicking as the characters weapon, how do you make the enemy take the damage. For instance, have the Player overlapping the enemy as long as the weapon animation is playing. Or do you have the weapon a different item if its a sword. I'm not sure what the best way of going about this is. Any advice would be great. Thanks.
...
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
22nd March, 2005 at 00:22:40 -
To take damage you could store the player's heath in counters or alterable values. For instance:
If player hits enemy > Add 1 to enemy.alt a
If "enemy.alt a" is greater or equal to 10 > Destroy enemy.
As for the physical side (Actually moving and hitting swords) there are a few threads going on at the momement discussing that issue.
He means when should it be a hit. Like if the animation is running, and he collides with an enemy, it counts. He want's advice on the detection of the attacks. Just to make that clear.
Personnaly I'd put the action point on the sword's tip. Then have some detector that always would be on the action point. So you wouldn't be facing away from the enemy, but hit him anyway. When the detector collides with the enemy, kill the enemy, or put down his life. get it?