I like to use a second object for the sword. I usually make Value A the amount of damage the sword does, and value B the hit percentage. Make sure you put in a "only once when event loops" in there, or your enemies will die much to quickly. Also, make sure that the enemies only take a hit when the swinging animation is playing.
Here's a really old version of my Zelda like game that you can look at.
www.angelfire.com/anime5/shabadage/advent.zip
It's not very well commented though
Craps, I'm an old man!
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
2nd November, 2003 at 03:27:00 -
Instead of using two seperate objects for the player and sword it is usually better to use one object as the player (drawn with sword) then create an invisible object and always set that to the action spot of the player (which you make as the tip of the sword). Then you can program it so when an enemy collides with the invisble object. Instead of letting you hit them with the side/back of the sword. - This also removes the laggyness from always setting the sword to the player.
An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.
You could but that would be pointless. It is much easier to do the 3 object method, and you get the same effect. Also, it allows you to use the invisible object as a "hit area". So if an enemy only touches your hat, it won't hurt you.
99 percent chance that the above post is 100 percent correct.
i think the old fastloop was capable of doing that, i used it a few times with TGF to remove the "lag".
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
15th November, 2003 at 01:43:47 -
JD - That's what i said, but then you can't customize it as good, without having to draw many animations.