Under rating threshold (hideshow)
I made some modifications in the programming gameplay-wise. One of those was creating a resetPosition() function, so your ship doesn't spawn exactly where it was killed the last time (since I made the game considerably harder with faster enemies and stuff, yeah, this is an issue.). If someone want to make it just create the function and declare the this._x and this._y wherever you want your ship to spawn. Cool stuff: if you remove this.removeMovieClip from the colision test against your shot, you have a piercing shot upgrade. =P
Under rating threshold (hideshow)
Hi everyone!!! Please, anyone can tell me what I have to do for the Health bar??? another question: I want that when enemy missile collides with my ship a little explosion comes out ( like the original shoot game) what I have to do??? Please I became crazy!!! (sorry for the bad english)
Under rating threshold (hideshow)
For the health meter try putting health = 100 in the onload function. Also the healthmeter and healthmeterbar in the library should have an instance name healthmeter. The see the actual bar instance name right click healthmeter and click edit. Then click on the health bar on the screen. Finally click on the properties panel on the right and you should see it.
Also on another note; no matter what I do I can make my ship become not visible can someone help me? I used: this._visible = false; in the explode function and everything else works but this.
Under rating threshold (hideshow)
i took out the .bar in the _root.healthMeter.bar._xscale = health; and it worked, maybe this will help other people (especialy if youre doing all of it by hand on your own but just following the tutorial)
Under rating threshold (hideshow)
If you are drawing your own health meter, you need to make the middle layer, the bar, a new movie clip in you library and then just pull it from the library into the health meter while you are drawing it, and give it "bar" for instance name. The border and background layer of the health meter are just normal pictures. Also, be sure to give the health meter the instance name "healthMeter".
Under rating threshold (hideshow)
If your score and health doesn't work, you probably need to put the functions for updating each
one at the beginning of the class an under the variables. It worked for me after I did this. This is probably different from as3, idk.
Under rating threshold (hideshow)
Alright, I was having this problem but a comment below helped me. I'm bumping it so other people will see it:
I don't know about other people but I couldn't get my score to show except for blank, 0, and 00. Somehow I fixed it by typing 0123456789 in the text box. I hope this helps someone...
Under rating threshold (hideshow)
There needs to be a "resetHealth();" in the onLoad function for health bar to work properly. So your onLoad Function should be:
function onLoad()
{
velocity = 10;
shootLimiter = 0;
enemyTimer = 0;
enemies = [];
resetScore();
resetHealth(); <- Here! :)
}
Under rating threshold (hideshow)
I pasted all the score parts correctly into the correct spots, I've re done this about three times, experimented with it for over an hour, and the score counter will not change. It is embedded and dynamic as it should be. Any help please send me a message.
Under rating threshold (hideshow)
It also helps if you have "health = 100;" under the function onLoad part with all the other variables, took me ages till I realized that. Also I noticed some people not understanding the source code when they downloaded it MAKE SURE you download the AS2 version and no the AS3.
http://cdn2.kongregate.com/assets/files/0000/1182/shoot-as2.zip
Under rating threshold (hideshow)
i keep left clicking the "click here to download.........." but it wont work so i right click>copy link location>new tab>address bar>right click>paste and go but it keeps sayin "google chrome could notfind........." now what?
Under rating threshold (hideshow)
I cantt get the health bar to work for some reason! all of the coding is correct and there are no errors in the syntax! If someone has a solution, please let me know somehow!
Under rating threshold (hideshow)
For those with score issues:
1: test your score-display by putting
_root.ship.score += 50;
_root.scoreText.text = _root.ship.score;
in your Explosion (before this.removeMovieClip)
- In game it should automatically start with a 0 and rise with every explosion.
- If you got that to work. You probably made a mistake when placing the resetScore and updateScore functions. They should be under the onEnterFrame function (not in it!)
- go over all of your {}
Under rating threshold (hideshow)
ok i have a couple problems. My health bar wont go down, but i get hurt and die. When I kill an enemy I dont get any points. And when I die my game over menu doesnt come up. I dont have any compiler errors and my code is 100% the same as the tutorials. Can someone help me out please
Under rating threshold (hideshow)
For me the problem was that i couldent add score to the scoretext. Later i realised that you need to put the " _root.ship.updateScore(50); " over the " this.removeMovieClip(); ". I think it is beacus when you remove it from the game you remove the commands for that Enemyship to , so the text under will never be execuded.
Under rating threshold (hideshow)
My healthMeter wasn't working until I added "resetHealth();" in the "function onLoad()" [--> Ship.as].
Perhaps this could help somebody.
Under rating threshold (hideshow)
for those who struggle with a game over menu, try making it in a seperate frame on the root timeline. then right click on both frames and type stop()
On the death function for you ship, rather than showing the game over menu, put _root.gotoAndStop("The frame with game over in it") similiarly with your button, make one, give it an instance name on the game over menu and type into the frame actions
"button's instance name".onPress = function()
{
gotoAndStop("Frame with main game on it")
}
Hope this helped!
Under rating threshold (hideshow)
Argh!!! KEEP GETTING AN ERROR MESSAGE! "The class or interface 'gameOverMenu' could not be loaded." on the previews it shows up as usual but play again link doesn't work. apparantly its to do with symbol=gameOverMenu, layer=bg, frame=1, line 1. i dont get it cos i only got a rectangle on that layer
Under rating threshold (hideshow)
I don't know about other people but I couldn't get my score to show except for blank, 0, and 00. Somehow I fixed it by typing 0123456789 in the text box. I hope this helps someone...
Under rating threshold (hideshow)
256 levels of recursion were exceeded in one action list.
This is probably an infinite loop.
Further execution of actions has been disabled in this movie.
Under rating threshold (hideshow)
I had an issue with the score and health meter not updating, but I moved the call to the update health and update score function above the call to this.removeMovieClip and it worked. I suppose once the movie clip is remove it stops calling code immediately.
Under rating threshold (hideshow)
:( Apparently I messed up on the score and kept getting something about classes - I couldn't test. I spent 3 hours comparing my script to the examples. It all seemed correct. Then I undoed many times to an effort to undo what i did wrong. I ended up back where I couldn't hit enemies with missiles :( and I saved before I found out. >.<
Under rating threshold (hideshow)
The game over menu is not working for me very well. Instead of removing the game over menu at the beginning, it removes my scrolling background image instead, and then restores the image when the game over menu is supposed to come up in the end. Other then the play again button not working in the end, everything else is working fine right now.
Under rating threshold (hideshow)
Really bugging me now! Everything is working fine *except* when health hits 0 the ship remains visible - only once has is actually disappeared on death like it should.
Game Over pops up, all enemies disappear, health meter reads 0 but the ship just will not hide.
Have checked the code over and over again but at a loss now.
Under rating threshold (hideshow)
If you copy the game over menu, be sure to set the instance name to gameOverMenu, it took me an hour to figure out that it wasn't done for me :P
Under rating threshold (hideshow)
Ok, if my ship gets hit by a missile the health goes all the way down to 0.The missile when it hits SHOULD be 10, I've checked it's file 20 times, and the update score is fine, so what's wrong?
Under rating threshold (hideshow)
it says there is no property called health on several lines of my ship class. this causes the whole game to notr work