NOTE: I WORK IN ACTIONSCRIPT 2, NOT AS3. THANK YOU.
Ok, I really should be able to do this, but whenever I do try, I fail miserably. My problem is combining hittests and variables. Right now I'm just screwing around with a little control design that I started a while back. Here it is so far. See that little 100 in the top left corner? Thats your little squares health. Whenever you hit one of the little black lines, or bullets, I need that number to go down by, lets say 1. I know how to change it and stuff, so it really dosen't matter. Ok, since all the other code is irrelevant il just post the hittest stuff.
onClipEvent (enterFrame) {
if (hitTest(_root.bullet)) {
_root.health-1;
}
}
Honestly I'm a disaster at hittests, but ive tried many tutorials and they dont seem to help, so Im asking you guys. I know this is quite a basic code, but i just cant do hittests. Anyways, ive done everything i know of to make the code work. I've givin the bullets the instance name bullet, ive made the 100 a variable the the place it appears in is a dynamic text box and all that, and you get the idea. Just if you can, please help.
Thanks in advance,
DFR