Under rating threshold (hideshow)
nvm, I got it to work, I just followed the tutorial all over again and it worked! by the way, Putting health=100; in the onLoad function works like a charm.
Under rating threshold (hideshow)
I hade problems with the health bar but this worked for me " Sutafuzz says: Try adding health=100; in the onLoad() function of Ship class. I'm not sure if you're supposed to do that, but it works for me. : ) "
Under rating threshold (hideshow)
Symbol=bar, layer=Layer 1, frame=1, line=1 The class or interface 'bar' could not be loaded.
Symbol=healthMeter, layer=Background, frame=1, Line 1 The class or interface 'healthMeter' could not be loaded.
Ship.as, line 24 Syntax error. function resetHealth()
Ship.as, line 25 This statement is not permitted in a class definition. {
Help pl0x?
Under rating threshold (hideshow)
also its best if you put the points you get from killing an enemy on the missile .as because you could still get points for ramming into the enemy
Under rating threshold (hideshow)
or if (score = 200) {
velocity = 50;
}
sorry about the amount of posts, bumping down possible important info, but hey this would be cool if we can get it set up on this one place, and it would suck if it was covered in a further shootorial
Under rating threshold (hideshow)
here is what I put to try before I got health set up. it doesnt work but if someone can improve on it and let me know that would be cool
if (_root.scoreText.text = 200) {
velocity = 50;
}
Under rating threshold (hideshow)
hey this is a little bit before ive got the health meter part (not entirely sure what the layers mean) im thinking of putting a sort of level up function and im basing it off of an educated guess that this would work
if(score=*put amount here*){
health=+*bigger health amount here*
}
or the same thing but without the + and just put a higher amount does anyone know if that would work? and for the layers, the "bar" layer, will that need to be an exported movie clip as well as the compiled thing?
Under rating threshold (hideshow)
instead of adding the update score as part of the explosion part of the enemy ship class, why not put it as part of the EXPLOSION class itself? wouldnt that look tidier?
Under rating threshold (hideshow)
As soon as I add the function updateScore(points) and I want to test it and go on "test movie" I can't control my ship anymore. when I remove the code, it does.
Under rating threshold (hideshow)
nvm I got it to work so well if I kill 1 enemy I get infinite points (NaN)
btw; this is sarcasm, what im really thinking is "I will find a way to make computers feel pain and them torture them!!!"
Under rating threshold (hideshow)
hey where does the function updateScore(points)
{
score += points;
_root.scoreText.text = score;
} go? it doesnt say and the place I put it doesnt work for some reason
Under rating threshold (hideshow)
@ryanwwong
Yes, it is simple and easy, but you are even more sad to assume everyone has the thinking pattern to figure out codes and variables in flash.
That aside, the tutorials up to this point have been very instructive, easy to follow and helpful!
Under rating threshold (hideshow)
L3M0N4DE & Kafana : Try adding health=100; in the onLoad() function of Ship class. I'm not sure if you're supposed to do that, but it works for me. : )
Under rating threshold (hideshow)
When I take a look at the Games scripting with adobe flash cs4, It shows Absolutly nothing except for stop(). Why can't I see the scripts?
Under rating threshold (hideshow)
As L3M0N4DE, I also have no idea on how the health meter works. I copied both the meter and the bar from the source file but I don't understand in the slightest how or why it works. Can anybody who knows how the health meter works contact me through my page.
Thanks in advance.
Cheers.
Under rating threshold (hideshow)
i can't figure out the healthMeter. im using CS4, and everything else is perfect, but i cant make the healthmeter work. anyone know how im supposed to do it? i cant download it, so im trying to make my own. leave a comment on my page since i dont get on here very often. any help would be much appreciated :)
Under rating threshold (hideshow)
@ ScaryFighter your not supposed to export it to actionscript. i was getting that error also even though it does not damage the game :)
Under rating threshold (hideshow)
I wish someone would do an AS3 version of this. I'm using Mt Sun Studios Brick Breaker tutorial at the moment but I'm developing it way beyond what is shown in the tutorials and I want to do able to do the things in here in AS3.
Under rating threshold (hideshow)
can anyone figure out the problem with the health bar? it keeps saying The class or interface 'bar' could not be loaded. and The class or interface 'healthMeter' could not be loaded.
Under rating threshold (hideshow)
@Luke:
Yeah you can actually put it after the this.removeMovieClip(); because of something I don't understand... I think removing basically sets the file in a queue for the next garbage collection which isn't right then... but maybe its doing something else. either way it does work.
Under rating threshold (hideshow)
Ok i understand that the gameOverMenu musnt be exported to actionscript, however it still doesnt show up when my ship explodes!! FFS
Under rating threshold (hideshow)
I think i may have found the reason, but not the solution. I think the reason is that whenever i get killed , my score and health are automatically reset to 100, however for the gameover screen to come up my health has to be < 1.
I actually have no idea how to stop the score and health resetting when i die, ideally i want it to reset when play again has been selected.... any help? thanks.
Under rating threshold (hideshow)
K, i've got to the part where my ship gets destroyed and the enemies and my ship disappear, however the gameover screen doesnt come up... and i've followed the code exactly :/ any help?
Under rating threshold (hideshow)
2. If your bullets dont take down your health, but the ship crashes does, this is a very simple mistake, where you have been told to put
function onEnterFrame()
{
_x += speed;
if(this.hitTest( _root.ship) )
{
this.removeMovieClip();
_root.ship.updateHealth(-10);
}
if(_x < 0)
{
this.removeMovieClip();
}
}
... make sure the _root.ship.updateHealth(-10); is ABOVE the remove movie clip function, otherwise the missile will disappear before the health is updated.
Under rating threshold (hideshow)
Here's a few tips guys that took me hours to figure out ¬_¬
1. make sure the "bar" inside the "healthMeter" has its registration set to left, i could not do this in the library so i went into the movie clip "healthMeter" and used Break Apart on the bar, then deleted "bar" from my library and converted the broken apart bar to a symbol, name "bar" registration point left, REMEMBER though dont export it to actionscript ( i dont know why, just dont do it )
Under rating threshold (hideshow)
Help me! When the scoreText variabel is updated with Score it dissappears!!! It's as the text doesn't support any other character than zero.
Under rating threshold (hideshow)
I can't actually download any of the source files, it doesnt work if I click it, and if I open it in a new window it just disappears...
Under rating threshold (hideshow)
These tutorials are amazing. They actually teach you. I have already finished my first game. See it at http://www.kongregate.com/games/rosslyn568/planet-defender ---- anyway, great tut. 5/5
Under rating threshold (hideshow)
im usin CS4, my dam health bar doesn't move, i tried usin it in my game im makin, nope. copied everythin the tutorial said and copied the code in case.. Nope. it doesn;t freakin work