Comments for Shootorial #6

avatar for Mars83
Mars83

Oct. 20, 2010

Under rating threshold (show) My healthMeter wasn't working until I added "resetHealth();" in the "function onLoad()" [--> Ship.as]. Perhaps this could help somebody.

+ - !

(65)

avatar for chunygami
chunygami

Dec. 10, 2009

Under rating threshold (show) Okay there how i solved my problem with health bar: 1.Create the healthMeter layer (i'll call it hMl) 2.On the hMl, create a New Symbol(Insert>New Symbol).Name it "HealthMeter"(Movie Clip that's all anything else) and click Ok. 3.Now "HealthMeter" is in your library, double click on it.You'll go inside. 4.There is a empty layer, just create 2 others and you'll have 3.Name them from upper to bottom:border,bar,backdrop. 5.Draw your Healthbar now: -On border layer: draw only border without anything inside.you can draw it with flash tools but you can import from png file too. -On bar layer:you have to draw the green rectangle with Flash. -On backdrop layer:draw a white rectangle or obmit it if you want it transparent (this layer isn't important).

+ - !

(26)

avatar for Hobelbruder
Hobelbruder

Apr. 22, 2010

Under rating threshold (show) if your health meter doesn't move, also make sure that your healthmeter on the scene has got the instance name 'healthMeter'. check this in it's properties. i needed 3 hours to find that out -.-

+ - !

(37)

avatar for iGreenPuffle92
iGreenPuffle92

Apr. 9, 2010

Under rating threshold (show) 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.

+ - !

(33)

avatar for joeharner
joeharner

Mar. 14, 2011

Under rating threshold (show) guys, kongregate forgot this in their last tutorial, but before any time you call removeMovieClip() inside your enemy class, you need to remove it from your array of enemies. Otherwise, bullets will continue to try running checks on the nonexistant objects, and the array will just grow longer and longer. i created an index variable inside the enemy class that I update whenever things are removed from the array and use before .removeMovieClip() like this: _root.(array name).splice(index, 1);

+ - !

(17)

avatar for 3ndl3ss
3ndl3ss

Jan. 12, 2013

Under rating threshold (show) "Now that we have a working health meter..."

+ - !

(4)

avatar for grandshadowdude
grandshadowdude

Jun. 4, 2012

Under rating threshold (show) This doesn't really explain how to make the health gauge or the game over menu.

+ - !

(4)

avatar for benjabby
benjabby

Jul. 19, 2010

Under rating threshold (show) grrrr. none of this works :( ive made it exactly. no errors. but nothing at all works. the health meter doesnt go down. score doesnt go up. :( its really disapointing because all the others have worked so far

+ - !

(4)

avatar for chunygami
chunygami

Dec. 10, 2009

Under rating threshold (show) 6.Select the bar layer and Modify>Covert to Symbol. Name it "Bar".Registre it to left and press Ok. 7.Single click on the "bar Movie clip" on edit mode and change his instance to "bar" and there must be instance of :Bar then let it 8.Go back on the Scene1,drop off HealthMeter(from library) on the stage and place it on the left corner(or anywhere you want) 9.Change his instance to "healthMeter" and check if "instance of:healthMeter" is right. 10.Add "health=100;" inside function onLoad() from class Ship. 11 it should work :)

+ - !

(16)

avatar for Azadiscool
Azadiscool

Jan. 2, 2011

Under rating threshold (show) 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...

+ - !

(3)

avatar for Duebel
Duebel

Nov. 19, 2010

Under rating threshold (show) 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 {}

+ - !

(3)

avatar for pancakerz
pancakerz

Jul. 20, 2010

Under rating threshold (show) this is by far the worst shootorial so far. especially for those who can't open the source files (the actionscripts work, just not the .fla) so we're forced to make a health bar and game over menu which the instructions "just do it" i did manage to work my way through, but if anyone can tell me why my health bar ends outside of the outline, rather than at the end of the outline, that'd be great. i'll try to work it through myself in the meantime

+ - !

(5)

avatar for marczero16
marczero16

May. 31, 2013

Under rating threshold (show) Tip to self: ALWAYS REPLACE THE ship name into the original instance name!

+ - !

(2)

avatar for Aedric
Aedric

Dec. 18, 2011

Under rating threshold (show) Don't use chunigamy's advice first unless you have tried the others, it wasted a half an hour for me.

+ - !

(2)

avatar for RafaelT4
RafaelT4

Jul. 13, 2011

Under rating threshold (show) Everything is perfect except the health meter doesn't move, I still get the game over thing, but it just doesn't move, it stays green, can anyone tell me how to fix this?

+ - !

(2)

avatar for Gamer200
Gamer200

May. 13, 2011

Under rating threshold (show) IMPORTANT! You must put "resetHealth();" in the Ship.as "onLoad()" function or it will not work.

+ - !

(2)

avatar for Geriath
Geriath

Feb. 28, 2011

Under rating threshold (show) 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

+ - !

(2)

avatar for calvinjliao
calvinjliao

Feb. 9, 2011

Under rating threshold (show) help!!! ive done everything possible but the health bar is not working!!!!

+ - !

(2)

avatar for LemonBot
LemonBot

Jan. 16, 2011

Under rating threshold (show) 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.

+ - !

(2)

avatar for knightgames
knightgames

Oct. 12, 2010

Under rating threshold (show) my healthbar isnt working, i tried checking all of my code but it all looks correct, any ideas?

+ - !

(2)

avatar for legorlan
legorlan

Oct. 6, 2010

Under rating threshold (show) 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!

+ - !

(2)

avatar for TheTinger
TheTinger

Aug. 28, 2010

Under rating threshold (show) i cant get the healthMeter to work i dont know how to make the green part a "bar" movie

+ - !

(2)

avatar for fatcatcog
fatcatcog

Aug. 13, 2010

Under rating threshold (show) it says there is no property called health on several lines of my ship class. this causes the whole game to notr work

+ - !

(2)

avatar for TheExterminator
TheExterminator

Feb. 28, 2010

Under rating threshold (show) Why isn't my Score Display showing up? I did exactly as they said.

+ - !

(2)

avatar for luke214
luke214

Feb. 20, 2010

Under rating threshold (show) Ok i understand that the gameOverMenu musnt be exported to actionscript, however it still doesnt show up when my ship explodes!! FFS

+ - !

(2)

avatar for Prodigalpops
Prodigalpops

Aug. 2, 2009

Under rating threshold (show) Ok... last bit.... 13. Reselect the healthMeter (with the border/bar/background layers) and with the green rectangle selected set the instance to "bar". 14. Now return to the Stage and from the library drag and drop the healthMeter onto the Stage wherever you wish it to be. 15. Finally set the instance name to "healthMeter". Enter the script code is as per the tutorial.

+ - !

(2)

avatar for Prodigalpops
Prodigalpops

Aug. 2, 2009

Under rating threshold (show) Continued... 8. Create another rectangle as above but coloured green. select it and set the X & Y oordinates to 0 and the Width and Height to the same as the background rectangles values. 9. Now insert another timeline layer and call it "border". 10. Change to the Pen tool and draw around the edge of the rectangles. NB. to get the "wiggly line" effect you will need to set the pen mode to "Ink" - I'll let you find that :-) 11. Now select ONLY the green rectangle you drew (hint - it's on the "bar" timeline level) and click Modify| Convert to Symbol. 12. Change the name to healthMeterBar and set the registration to the middle left square. to be continued...

+ - !

(2)

avatar for Prodigalpops
Prodigalpops

Aug. 2, 2009

Under rating threshold (show) Here's how I created a health bar (NB. I use CS4 so there may be minor differences in menus etc.) It's a rather long comment so I've broken it into sections... 1. Create a new layer in the time line and call it "HealthLayer". 2. With HealthLayer selected select the Insert | New Symbol menu option. 3. Make the name healthMeter and click Ok. 4. On the timeline edit the layer name to "background". 5. Draw a rectangle with the border and fill the same colour (e.g. light grey) 6. Select all of the rectangle and set the X and Y coordinates to 0. The Width and Height are your choice. 7. Insert a new timeline layer and call it "bar". To be continued....

+ - !

(2)

avatar for SepMan
SepMan

Aug. 12, 2010

Under rating threshold (show) Please help! My score won't show up! I shoot an enemy, and the score either changes blank, 0 or 00. Help me! And how do you make a game over menu?

+ - !

(6)

avatar for iGreenPuffle92
iGreenPuffle92

Apr. 9, 2010

Under rating threshold (show) HELP!!! I cant get the Health Bar to work!! it just stays at 100!

+ - !

(6)

avatar for katana099
katana099

Apr. 8, 2010

Under rating threshold (show) I can't seem to press the play again button.

+ - !

(6)

avatar for dan62
dan62

Sep. 6, 2010

Under rating threshold (show) :( 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. >.<

+ - !

(4)

avatar for Lethosity
Lethosity

Aug. 17, 2010

Under rating threshold (show) If the healthbar stays at 100, see if you have added the resetHealth() function at onLoad. If it don't, add it.

+ - !

(4)

avatar for RockAzombie
RockAzombie

Aug. 7, 2010

Under rating threshold (show) I'm having Problems with the healthMeter / Bar i don't know how to add the bar to the healthMeter. Can somebody explain this to me?

+ - !

(5)

avatar for Malqua
Malqua

Apr. 3, 2010

Under rating threshold (show) Source File: http://chat.kongregate.com/gamez/0002/6453/live/assets/source_files.zip

+ - !

(5)

avatar for onca
onca

Jun. 4, 2013

Under rating threshold (show) 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.

+ - !

(3)

avatar for Mattistrees
Mattistrees

Nov. 30, 2010

Under rating threshold (show) What about impenetrable walls?

+ - !

(3)

avatar for pwnguy
pwnguy

Jul. 2, 2010

Under rating threshold (show) error: there is no method with the name : resetScore. ??

+ - !

(3)

avatar for Necrolord_Bob
Necrolord_Bob

Apr. 22, 2010

Under rating threshold (show) @junkle That happened to me, too. Make sure you set the score to zero at the start.

+ - !

(3)

avatar for southhollister
southhollister

Apr. 19, 2010

Under rating threshold (show) ATTN: Problems with score- go to properties, click embed, select don't embed... shout out to barefootjeremy.

+ - !

(3)

avatar for Junkle
Junkle

Apr. 15, 2010

Under rating threshold (show) My score has decided it hates me, so whenever I explode an enemy instead up updating with the added score it disappears. Anyone else getting this problem?

+ - !

(3)

avatar for iGreenPuffle92
iGreenPuffle92

Apr. 11, 2010

Under rating threshold (show) I finished my Game! Please Play it Here! http://www.kongregate.com/games/iGreenPuffle92/maxotonic

+ - !

(3)

avatar for BiPoLuh
BiPoLuh

Mar. 5, 2014

Under rating threshold (show) The tutorials were really good... then this one came along and the poster was like "meh I'm tired of writing detailed tutorials, here's random jarble."

+ - !

(1)

avatar for thwible
thwible

Apr. 5, 2013

Under rating threshold (show) go to this link for the health bar http://adobe-flash.wonderhowto.com/how-to/create-enemy-and-health-bar-for-flash-rpg-158386/

+ - !

(1)

avatar for demyx3
demyx3

May. 14, 2012

Under rating threshold (show) @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

+ - !

(1)

avatar for demyx3
demyx3

May. 14, 2012

Under rating threshold (show) Remember to put resetHealth(); in your onLoad function!

+ - !

(1)

avatar for farquay
farquay

Apr. 22, 2012

Under rating threshold (show) 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

+ - !

(1)

avatar for silent22
silent22

Apr. 22, 2012

Under rating threshold (show) 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.

+ - !

(1)

avatar for Sketchist
Sketchist

Apr. 15, 2012

Under rating threshold (show) TYPO page 5 it says it's instead of let's. Thank you, kongregate for the tutorial!

+ - !

(1)

avatar for CUBAN0L0C0
CUBAN0L0C0

Apr. 3, 2012

Under rating threshold (show) 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.

+ - !

(1)

  • add a comment