OK, so I’m on the shootorials, and I got to #6 with no problems, i made a working score counter, but my health bar won’t work. I copied the same one from the example (the green one) and I put in all the scripting stuff (and double checked it), and there are no errors, but when I play my game, everything works perfectly, except my ship cant lose health! any help would be nice!
|
|
|
|
|
The best way to debug something like this is to stick a few |
|
|
Can I just stick them anywhere, or should I put them in the functionOnload place? Whatever, I’ll try. |
|
|
. |
|
|
You put trace statements before/after pieces of code to check that they’re running properly. For example, you would put |
|
|
When I put in the trace thing, whatever actionscript i put it in, doesnt work. for example, if i put it in the enemyship class, no enemy ships come, or if i put it in the enemy missile class, the bullets stay where they are shot from. |
|
|
also, when I put them in, the one error that comes up EVERY time is: "The class or interface ‘bar’ could not be loaded. If that is what is causin g the problem, what can I do to fix it.? |
|
|
You probably have “bar” in the class box in the properties of your health bar movieclip, when you should have “Bar” |
|
|
Yeah, i did have bar instead of Bar, but that still hasn’t fixed the problem, thanks for your help though! |
|
|
Well….I’m honestly clueless to exactly how you can screw up the change from: But at this point I think you simply forgot to give the bar in the healthMeter Movieclip an instance name. Also, consider editing your posts instead of double-posting. |
|
|
I’m having the same problem. I did a trace, and the health var is actually decreasing when I get hit, but the life bar still isn’t changing. |
Loading