ForumsProgramming Forumattack skill in my game does not work...

0 3307
880 posts

as the title says i have tried to make so if my character attacks an enemy th enemies health goes down, and if the current frame isn't attack it makes your health go down, but when i try to make that happen it combines the two effects

code (in a generality)

(note Dx = (sprite._x += sprite.dx) or in other words it is similar to using the word power)

if (Player.hitTest(enemy1)){
_root.lives -= 1;
Player.dx -= 10;
if (Player.currentFrame = "attack&quot{
_root.lives -= 0;
destroy(enemy) (the code destroy makes the enemy shoot off screen it is later on in the code)

Player.dx -= 1;

using AS2 please need help

  • 0 Replies
Showing 1-0 of 0