I’m working on a Stick Shooting game (the first draft can be seen at http://www.stickslaughter.com/stickshooter.html) and had been attempting to make a stick, walk from one side of the stage to the other, and repeat. I can do that easily now with Lostinbetas help.
But… I’ve run into one more problem, I’m trying to make an escape count (how many sticks you missed, but when I put the actionscript on the stick, even after you shoot it, it still counts as escaped…
Okay, so that’s adds one to the escaped count, when the stick has reached 500 x on the stage. How would I make it so when you shoot the stick, and he fades down to 0 alpha, that it doesn’t count on the escape count?
You can increment esaped with ++ instead of what you were doing before… it basically does the same exact thing you were doing before, but written smaller…lol.
As for the problem at hand… you increment the escape when the clip reaches the end.
Now considering your last problem… your clip, even after being shot still moved until it hit the 500 mark, so of course it will always increment.
So what you will have to do is add another if statement to see if the out animation has been played, the easiest way probably for this is to take the frame number that your fade out animation starts (after it is clicked) and check to see if that frame or higher is being played, then increment. Something like…