Under rating threshold (hideshow)
hmm... I got everything working right, but new enemies still zip past my screen after they explode with the game over screen.
Under rating threshold (hideshow)
I dont think that should matter because when your bar reaches 0 I think the code will bring up the game over menu. At least I imagaine thats what will happen.
Under rating threshold (hideshow)
Thanks Vancano— the only thing I have to fix now is my health bar extending too far to the left after a number of hits...
Under rating threshold (hideshow)
Just read through all of the old comments. PooandWee solved the issue for me! On Load needs to have health=100 in it. Works fine now!
Under rating threshold (hideshow)
Purelymad I think the answer to your question is the same as with Cloud's. By listing the class name in the properties page flash is trying to find a class with that name, so deleting it should solve the issue. I hope.
Under rating threshold (hideshow)
Cloud:
"the class or interface "healthmeter" could not be loaded" any ideas
I had this one, just figured it out today. Go into the properties and just delete the name in the 'class' box. The reason it can not load the class is because there is no class for the health bar.
I'm just struggling to get my healbar to update when one of the enemy ship's hits/shoots mine.
Under rating threshold (hideshow)
I've done up to Shootorial #6 and it works fine except my Game over menu wont work when I die.
Can anyone explain how to set the gameovermenu up or how to make one yourself that works?
Under rating threshold (hideshow)
It's telling me that the health bar + game over screen movie clips cannot be loaded, but they work anyway. Something I should be concerned about?
Under rating threshold (hideshow)
For the score thing: Make sure there is NOTHING in the box in the flash file (no numbers, it will put a zero there automatically). Also, check all of the names you used for the scorebox again (i.e. using the root 'ship' instance name you assigned)
Under rating threshold (hideshow)
I keep getting an error method that says:
There is no method with the name 'resetScore'.
At first I thought that would be fixed later in the tutorial but alas it does not.
Anyway, what does this error message mean and how could I possibly fix it?
Under rating threshold (hideshow)
scores work perfectly now but my bad fortune has struck again! now i cant make a working health bar and im not even sure if my health meter is made correctly!
Under rating threshold (hideshow)
I got lost with this step, socre is working fine, but my healtbar is f*cked up... Now i'm geting syntx errors of my gameovermenu, and healthmeter and bar that couldnt be loaded etc.. please :D someone HELPME
Under rating threshold (hideshow)
@nikitarama you could do what i did to make the enemies stop coming.
just add if(health<1)
{--timer for the powerups--=--any number higher then the timer--;}
Under rating threshold (hideshow)
OMG! HOLY FRICK I SOLVED IT! AND I ONLY HAD TO ADD THE VISIBILITY VARIABLE!! WHAT THE- the rest of this comment was removed for insane amounts of swearing and cussing and hatred-
Under rating threshold (hideshow)
How come I can't frikin make my guy dissapear? Did the shootorial leave out a piece of code? I put all the correct functions for the explode and added explode() to my update health function but It doesn't explode.
Under rating threshold (hideshow)
how do you remove the powerups from the stage when the ship explodes?
because mine don't and i can still rack up points and regenerate health once i'm no longer visible (if there were still powerups once i exploded)
Under rating threshold (hideshow)
when i enter the following code;
"function updateScore(points)
{
score += points;
_root.scoreText.text = score;
"}"
There is no property with the name 'score'."
and
"There is no property with the name 'score'."
Under rating threshold (hideshow)
@ CodeGuy: go to your healthmeter, keep dubble-clicking on it until you are at the healthmeterbar. then, drag the bar until the little cross in the middle is at the upper left corner of the bar. (hope you understand what i just said...)
Under rating threshold (hideshow)
To make the health bar scale properly but without testing it myself (I am about to try) add the following to the update health function:
_root.healthMeter.bar._x += ((points / 2) * 1.5)
Replace 1.5 with one tenth of the number of pixels in your health bar; that will only work for me.
Under rating threshold (hideshow)
Forestviolence, I did that when I made my health meter, but scaling doesn't work right. Any idea how to make it scale from the left instead of from the center? In the health meter in the exmple, the anchor point on the bar is on the left instead of the center, but I don't know how to do that.
Under rating threshold (hideshow)
I have very limited programming knowledge... (HS class 10 years ago C++), after troubleshooting 5 teams each shootorial, it's working.
thanks for the motivating shootorials to get me back into it.
Under rating threshold (hideshow)
what if you wanted to add an animated intro for the game over screen? how to get it to freeze at the last frame of animation, for you and until you click the play again button?
Under rating threshold (hideshow)
to make your own healtMeter:
right-click on the library
select "new symbol"
name it "healtMeter"
make 3 layers. top layer: border
middle layer: bar. (selection tool, right-click, "convert to symbol", movie clip, name: "bar" and give it the instance name "bar")
bottom layer: the backdrop color.
then you done ^^
Under rating threshold (hideshow)
Looks to be a small mistake on page 10 - you say set the _visible to false, and then talk about the _visibility property that all objects have - small typo
Under rating threshold (hideshow)
Can some1 help wen i put in the function updateHealth(points)
{
health += points;
_root.healthMeter.bar._xscale = health;
}
function resetHealth()
{
health = 100;
_root.healthMeter.bar._xscale = 100;
} i get 3 errors sayin theres no property with health can some1 help?
Under rating threshold (hideshow)
Mexasian, make sure that all the stuff you have to name on your gameover screen are right. Also, make sure the text is static and there's also a tiny little button for the text to make it so the play can't select it.
Under rating threshold (hideshow)
Everything else is working, but my game over screen isn't working. I'm not able to press the new game button, and the enemy ships appear while the window is still up. Help?
Under rating threshold (hideshow)
so, add the resetHealth-function to your Ship-class as described on page 6 of the shooturial. then, add "resetHealth()" to your onLoad-function of your Ship-class
Under rating threshold (hideshow)
@virtualcrush: you're wrong. this toturial says you to add "resetHealth()" to your onLoad()-function. this function has "health = 100" in it. so when the game starts, the function "resetHealth()" is called, who sets you health to 100 and sets the healthbar back to full health.
Under rating threshold (hideshow)
Nevermind about the play again button, I got that. Now if I could just figure out how to make the health bar scale from the left.
Under rating threshold (hideshow)
Also, I'm doing something wrong with the "play again" button that I made. I cann't click on it unless I delete the text. Anyone know how to fix that?
Under rating threshold (hideshow)
I got the health bar to scale, but it scales from the middle instead of moving towards the left. I made mine myself and it is almost like the one in the sample, except that the anchor is in the middle of mine and on the left of the sample's. Can anyone tell me how to move the anchor?