Under rating threshold (hideshow)
Less good episode, instead of 5-25 minutes took me 2h+ to finish page 8....
------------
The Score and Health code for the Ship class needs to be under the functions {velocity = 10;, shootLimiter = 0;, enemyTimer = 0;...} under the "function onLoad()". Look at screen shot to see where I put it.
Under rating threshold (hideshow)
I'm having a problem, when I put my "gameOverMenu" from the library on the stage, the score doesn't display on my game, and if I remove the gameOverMenu, the score displays, someone already had this problem? PS: The scoreText and the gameOverMenu are in separated layers.
Under rating threshold (hideshow)
This tutorial is very bad. It doesn't explain any of the mechanics of the health meter ("just copy it or make it yourself"), and even the copied one doesn't work.
Under rating threshold (hideshow)
go to this link for the health bar
http://adobe-flash.wonderhowto.com/how-to/create-enemy-and-health-bar-for-flash-rpg-158386/
Under rating threshold (hideshow)
page 6:
the explode-function comes from the enemy ship, so you have to give the enemy ship an instance name and then use "_root.enemyShip.explode();"
Under rating threshold (hideshow)
Help plz! I'm stuck on the score. The text never changes. I tried adding _root.scoreText.text = "SCORE"; and _root.scoreText.text = 25; to the onLoad for the ship but neither one worked. Any suggestions?
Under rating threshold (hideshow)
Using CS4 with actionscript 2. Dont know if anybody has come across this yet but for me anyways, when doing the custom functions for the score, it would only work if I put them ABOVE the onLoad function.
Under rating threshold (hideshow)
@silent22 you can make a new function similar to the explode(); function that dosen't give you points, and you can call that function instead
Under rating threshold (hideshow)
I cant figure out how to fix the PLAY AGAIN button. Could someone explain in detail how they incorporated the PLAY AGAIN button? I used a Text Box and the coding provided. Ty for help
Under rating threshold (hideshow)
Is there a way to make it so that the enemies don't give you points when they explode when you die? And great tutorial.
Under rating threshold (hideshow)
For all problems with the health meter not going down, don't forget to add resetHealth(); in the function onLoad() for ship. Worked for me
Under rating threshold (hideshow)
for all with health bar issues read this: http://tinyurl.com/7xrwzz4
you can still use the objects names from the tutorial just make sure you cut/paste and make a new layer like the book says.
Under rating threshold (hideshow)
_root.gameOverMenu.playAgainButton.onPress = function()
{
_root.ship.newGame();
}
The above code isn't even attempted at being explained. Please can someone help
Under rating threshold (hideshow)
if your healtbar that you made yourself scales at both sides
make sure if you convert it to a symbol
you can pick between 9 squares
dont choose the middle one,
but the left or right
i don't know how to change it so just make a new symbol
Under rating threshold (hideshow)
IF YOUR HEALTH BAR IS NOT CHANGING: try this. 1. click the healthMeter on screen and check the properties to make sure it has the proper instance name "healthMeter". 2. double click the healthMeter on screen to go "inside" it and then click on the green bar and make sure it has the proper instance name "Bar". 3. also make sure that the green bar is a MovieClip. 4. If this Comment has helped you approve it.
IF YOUR SCORE IS NOT CHANGING: I don't have a good solution for this, but I changed the text to "1234567890" before running and after it resets it seems to display the score properly.
Under rating threshold (hideshow)
When I do "_root.ship.updateScore(50);" it works fine, but when I do "_root.ship.updateScore(variablehere);" it doesn't work. Anybody know why? I'm sure it's an easy fix but have been banging my head on it for longer than I care to admit.
Basically, I'm trying to have a score modifier so my score will not always be a flat 50. I can't seem to pass that variable through though. When it triggers the score just completely disappears..
Under rating threshold (hideshow)
i knew something is wrong that's why i can't get this one to work
i double entered function updateHealth(points){health += points;if(health < 1)
if folks are having problems try downloading the source files then compare bothto see the difference
Under rating threshold (hideshow)
Hey guys if you're having a problem with your play again button, here is the right syntax for the code. Kongregate decided to f**k it all up. YOU DON'T NEED THE BRACKETS CALLING ON THE FUNCTION:
_root.gameOverMenu.playAgainButton.onPress = function newGame();
You call the function from inside the function, on the button press. You don't need the brackets to call the function from there. Sometimes Kong is stupid as hell.
Under rating threshold (hideshow)
I love these tutorials. I do not actually make that game but it is great that when I just dont know how to do anything, I can just look into tutorial where it is explained. GJ kongregate.
Under rating threshold (hideshow)
i dont know why but it wont work if i use healthMeter as instance name.
i tried to remove a letter and it works.. using bar as instance doesnt give me problem
can someone tell me possible reasons why i cant make it work with instance name healthMeter but works if i change it? btw im using Adobe Flash CS5.5 Pro
Under rating threshold (hideshow)
@iGreenPuffle, chunygami, anyone: When you make health = 100 that fixed the problem for me too. Is it because health var had not been defined yet as a var type? Does making it 100 for some reason tell Flash what data type to make it? Just wondering why that fixed it for future troubleshooting.
Under rating threshold (hideshow)
I had my score just showing zeros all the time. The problem was with the embed in the properties of scoreText, you actually need to click the little box before the numerals (0..9). There will be a V in it. Thought you just had to select it and click ok, but you need to check it of in the list. If you dont check numerals, it can only show the characters that you have already typed in the box, that is why typing 1234567890 in the box is also a solution.
Under rating threshold (hideshow)
ATTENTION! If your score isn't showing up at all despite you checking the instructions and banging your head against the wall several dozen times, check the color of the text in the text box. Even if it's a color that SHOULD show up, look at Alpha. Is it 0%? This is why it's invisible, alpha is the transparency. I don't know why, but the default value of alpha for me is 0%, which means it's invisible, set it to 100% and your problem will be solved. Hope this helps someone else.
Under rating threshold (hideshow)
when you make your own healthmeter, make sure when you convert the bar to a movieclip, that the registration point is on the middle-lower point.
Under rating threshold (hideshow)
Hey, for those of you who can't see your score because it's blank. Click on the text box for the score and go to the properties tab. Make sure the font color is black. Mine was on white and I couldn't see the score and thought it was a programming error. :/ fail
Under rating threshold (hideshow)
big problem... i can't get my gameOverMenu to dissapear and for some reason the onEnterFrame function on my ship class isn't working... any ideas?
Under rating threshold (hideshow)
I cannot get my gameOverMenu to disapear and reapear when I die. It is always there. I have copied all of the source code to do it and it didn't work and then I tried using there gameover menu and that didn't work either!
Under rating threshold (hideshow)
went on to the next shootorial, but then noticed that after i died everything went normal until i hit play again, after that everytime i hit spacebar (to shoot), it runs the play again function, i get reset, i think whats happening is that because i hit play again, the button is still selected even though its invisible and everytime i hit space it presses it again, so i get reset, does anyone know how to disable the button, i tried by setting it to enabled = false until the game over appeared but it doesnt work, am i missing something really obvious
Under rating threshold (hideshow)
They said Shootorial 5 was the hardest, not by much apparently, i cant get my score NOR my health to work, ive gone through around 5 pages of comments to find a solution and ive tried almost everything, ive redone them multiple times and still nothing, score just goes to 0 (so the reset works) but doesnt increase at all, and the health does nothing
Under rating threshold (hideshow)
Like everyone else, I am also having problems with the health bar. After ten hits from enemy ships and missiles, my ship will explode on cue and then the game over menu works like a charm. The only problem is the fact that the health meter image never changes. Does anybody have any other suggestions to help solve this issue?
Under rating threshold (hideshow)
I figured out the problem and fixed it but now my health bar wont work I tried what mars83 posted and what iGreenPuffle92 posted and neither worked I tried them together and seperate and I can still play the game but the health bar won't work and its instance name is healthMeter. my health bar is copy posted from the source so I don't know what might be wrong?????