by DilloDude » Fri Jul 20, 2007 11:24 pm
Here is the way I would do it:
you want separate actors. Make the part of you that does the damage a different actor from the rest of you. For example, if your player is a guy with a sword, then make an actor 'player' and another 'sword'. All animations would have to match up. When sword collides with an enemy, test if it is swinging (either by animindex or by a special variable) and do damage accordingly. The advantage to this method as oppesed to using one actor with variables is that you can still get hurt. So if I swing with a sword, and somebody touches me in the face, I die, not him.
A similar method involves one single graphic that is displayed and two hidden actors that aren't. The player would then have an image the basic shape of the player, and would do all the stuff that a player normally does. The attack part would be the shape of the part that does damage (whether it's a sword, a fist, or whatever).