Comments for Shootorial #5

avatar for dasneor
dasneor

Nov. 13, 2010

Under rating threshold (show) This tutorial is so helpful i have the half of my game finished and it looks perfect.You should thank kongregate for this thing.

+ - !

(77)

avatar for 12pwn
12pwn

Feb. 5, 2011

Under rating threshold (show) make sure the instance name is DIFFERENT from the class name otherwise the properties wont work

+ - !

(44)

avatar for Vind777
Vind777

Mar. 24, 2011

Under rating threshold (show) I suppose the instance name can make some problems if it has the same name as the class name. So you should name it not "ship" but something other. Also don't forget to change "_root.ship" to "_root.newInstanceName"

+ - !

(17)

avatar for Garfeildman
Garfeildman

May. 8, 2010

Under rating threshold (show) SilentDemon, the links not broken, right click on it and select open in new window, or tab.

+ - !

(48)

avatar for MTB666
MTB666

Sep. 2, 2010

Under rating threshold (show) hey, can someone help me? Im having a problem in page 2. When i name the hero ship instance "ship", in the root timeline, it looses all of the functions and properties ive add in the past tutorials. Im using flash cs4, idk if thats the problem.. If anyone knows how to solve please pm(message) me or leave a comment. Also, sorry for the bad english, im not a native speaker. Thx =)

+ - !

(34)

avatar for hannesdelbeke
hannesdelbeke

Feb. 20, 2012

Under rating threshold (show) ProTip: press v to get the selection tool

+ - !

(3)

avatar for mi4c
mi4c

Apr. 26, 2011

Under rating threshold (show) "Okay, we're half way done. Take a break, check your e-mail, play a game, spam chat. No don't spam chat." Lolz..

+ - !

(13)

avatar for teoisgood
teoisgood

Apr. 27, 2010

Under rating threshold (show) for the source files: right click and open in new window. then, when it appears , quickly press ctrl+a. it worked for me! (it was opening and closing before)

+ - !

(22)

avatar for pheibos
pheibos

Jul. 3, 2011

Under rating threshold (show) Only half of the enemies on-screen are being killed by my bullets- the rest of them, I can only kill by moving my hero into them. Does anybody know a fix?

+ - !

(6)

avatar for SlayerOfPersians
SlayerOfPersians

Aug. 14, 2011

Under rating threshold (show) Everyone who can only shoot half their enemy ships, listen up: You're not putting all the enemy ships in the enemy array. Many of us weren't careful when we copied and pasted the Shootorial code into the onEnter function, so now we have two independent ship launching codes. Basically, if you forget to delete a certain bit of code, half of the new enemy ships are not pushed into the array and so aren't affected by missiles. To correct this, look at the source ship.as and compare it to your code under the onEnter function, specifically the part that reads "if (enemyTimer..." I deleted a line from my ship.as to match the source, and it works without a hitch now!

+ - !

(5)

avatar for EphY
EphY

Mar. 17, 2012

Under rating threshold (show) Neither Firefox nor Internet Explorer is allowing me to download the source files. Could somebody PM me a direct link?

+ - !

(2)

avatar for Fishdawg
Fishdawg

Mar. 8, 2012

Under rating threshold (show) This tutorial is lacking in its explanation of a for... in loop. How exactly does it work? I see it's in the onEnterFrame method so for each frame does it check the entire array?

+ - !

(2)

avatar for CaptianKirk
CaptianKirk

Jan. 4, 2012

Under rating threshold (show) The explosion MovieClip lives in "sh_05.fla"

+ - !

(0)

avatar for mailbox061583
mailbox061583

Oct. 19, 2011

Under rating threshold (show) step 9 causes a memory leak. each time we make the enemy array larger, the for loop that checks if your shots hit anything takes a little but larger. if you decided to expand the game with that code, you'll start to get massive slowdown as the array reaches the ten thousands or so. any chance someone reading this can help me write a splice function to keep the array size reasonable?

+ - !

(2)

avatar for ZaGunny
ZaGunny

Oct. 12, 2011

Under rating threshold (show) can someone tell me how to insert the explosion in cs5.5? cause when i try to open the Fla file it says "Unexpected file format"

+ - !

(2)

avatar for BoredomDeleted
BoredomDeleted

Sep. 24, 2011

Under rating threshold (show) If you're having trouble with the link, right click on it and open in new window.

+ - !

(2)

avatar for TheHugLife
TheHugLife

Aug. 25, 2011

Under rating threshold (show) I have searched through my code a million times, and cant find any reason why my explosion animation loops constantly when I destroy an enemy. I even tried importing the kongregate explosion file + code, to no effect, so the problem obviously doesnt lie with explosion.as file. PLEASE help, its the only major problem Ive encountered so far and am unable to figure this one out on my own, ive been stuck on it for two days!

+ - !

(2)

avatar for Qikker
Qikker

Aug. 12, 2011

Under rating threshold (show) For all people who have problems with missiles that don't make enemie explode: after a week I finally solved it! You have to make sure that the name of your 'ship' is exactely filled in the codes, and it must be different from the class name. So I called it 'ShipInstance' and it only worked after I filled in this: for(var i in _root.ShipInstance.enemies) { if(this.hitTest( _root.ShipInstance.enemies[i] ) ) { this.removeMovieClip(); _root.ShipInstance.enemies[i].explode(); }

+ - !

(2)

avatar for hamuka
hamuka

Jul. 31, 2011

Under rating threshold (show) When I wanted to import the .fla file into the Flash library, the Flash said: "One or more files were not imported because there were problems reading them." Also, nothing moves in the test movie. I have Flash CS 5.5, don't know if this is the problem.

+ - !

(2)

avatar for spinzter
spinzter

Jul. 11, 2011

Under rating threshold (show) please help whenever i shoot my missile at an enemy it wont kill it

+ - !

(2)

avatar for lego_pi
lego_pi

Jul. 10, 2011

Under rating threshold (show) Nevermind. Answer is yes. Kind of cheap that AS2 does that. I would expect more than a good old fashioned bounding box-style thing. Ah, well. It's still very useful.

+ - !

(2)

avatar for Cacuu
Cacuu

May. 31, 2011

Under rating threshold (show) i'm using flash cs5 and when i try to use the hitTest line it just returns an error saying that i cant use that code on a Class definition =( any solutions?

+ - !

(2)

avatar for chokofant
chokofant

May. 20, 2011

Under rating threshold (show) @Twizler09 Right Click and open in new window.. It worked for me in google chrome :)

+ - !

(2)

avatar for DDKnoll
DDKnoll

Nov. 21, 2010

Under rating threshold (show) Found source code... http://ayumilove.wordpress.com/2009/05/15/kongregate-labs-shootorial-resources/

+ - !

(2)

avatar for DDKnoll
DDKnoll

Nov. 21, 2010

Under rating threshold (show) For some reason, the link to download the source files isn't working. Can somebody upload?

+ - !

(2)

avatar for AlmightyGERM
AlmightyGERM

Jun. 7, 2010

Under rating threshold (show) @ marx4400 I've read that it has something to do with the name of your instance. I just had that problem. If you name the instance the same name as the class nothing works. Problem I'm having now is I can't get my hit detection to work. Enemies are flying right through my ship :(

+ - !

(2)

avatar for ilysean1203
ilysean1203

Apr. 5, 2010

Under rating threshold (show) FINALLY! this tutorial made me mad!

+ - !

(2)

avatar for StripedTriangle
StripedTriangle

Nov. 29, 2008

Under rating threshold (show) This guide is almost as good as cake!

+ - !

(2)

avatar for parrotman555
parrotman555

Nov. 13, 2008

Under rating threshold (show) Here is a nice little feature I picked up from C++. put this in your ship class. if(_x>600) *new line* { *new line* _x=600 *new line* } Also include the same thing for x300. This will stop the hero ship from leaving the screen.

+ - !

(2)

avatar for jimjimmy1995
jimjimmy1995

Sep. 25, 2010

Under rating threshold (show) Right. None of the missiles were hitting the ships and disappearing but i managed to get the enemy missiles to disappear. Anyone got any suggestions concerning hero missiles as i can't find any problems with it. I'll keep trying. Thanks.

+ - !

(4)

avatar for War_Hammer69
War_Hammer69

Oct. 4, 2010

Under rating threshold (show) Hey guys, I have completed this game and its works perfectly. But when I try to use the same sort of code for another game the collision detection doesn't work. It only detects the first object enemy or object wall in the array and no other. Can please help me out? :D I start off stating the array.

+ - !

(5)

avatar for bigauburnfan101
bigauburnfan101

Sep. 2, 2010

Under rating threshold (show) For some reason, the enemy ships are exploding when I run into them, but not when my missiles hit them. If you have any idea why this is happening, then please send me a message. Thanks!

+ - !

(5)

avatar for Totalwin
Totalwin

Nov. 16, 2010

Under rating threshold (show) Where do u get the Explosion clip animation??????? I downloaded the source files and it was a WinRaR, what is the explosion thing called?? I cant find it in side the files

+ - !

(3)

avatar for la8ball
la8ball

Sep. 7, 2010

Under rating threshold (show) For ppl having trouble with page 2 and changing instance name, if ur layer Ship also then either rename the Ship something else or the layer. The reason its not working is because it's using the layer name "Ship" instead of the movie clip. I just change the instance name to something else and it works fine.

+ - !

(3)

avatar for Gervonte
Gervonte

Nov. 21, 2010

Under rating threshold (show) @ Totalwin you have to open the final fla in the project and look in its library for the explosion

+ - !

(4)

avatar for Olimar72
Olimar72

Oct. 13, 2010

Under rating threshold (show) To everyone complaining about hitTest not working: make sure to define your explode function OUTSIDE of the onEnterFrame function. Should look like this. class EnemyShip extends MovieClip { var speed; function explode() { this.removeMovieClip(); } function onLoad() { _x = 700; _y = Math.random()*200+50; speed = Math.random()*5+5; } function onEnterFrame() { _x -= speed; if (_x<=-100) { this.removeMovieClip(); } if (this.hitTest(_root.ship)) { explode(); } } }

+ - !

(4)

avatar for Biggums426
Biggums426

Jan. 26, 2013

Under rating threshold (show) Sorry, it's properties you need.

+ - !

(1)

avatar for Biggums426
Biggums426

Jan. 26, 2013

Under rating threshold (show) CS6 users, on page 5 it is not linkage, but edit to change the options.

+ - !

(1)

avatar for azhrak
azhrak

Jun. 20, 2012

Under rating threshold (show) anyone have a code that speeds up the enemy spawn timer gradually?

+ - !

(1)

avatar for son_o_lilith
son_o_lilith

May. 22, 2012

Under rating threshold (show) Man I'm so Stupid!! I typed var enemies instead of var enemy. LOL my bad.

+ - !

(1)

avatar for son_o_lilith
son_o_lilith

May. 22, 2012

Under rating threshold (show) Same with Markonan here, the array puts me in error. And I don't think the instance name '_root.ship' is the problem. Actually, I found an error window right beside the timeline window, "There is no property with the name 'enemy'" it says. I have little idea what it means, can somebody help?

+ - !

(1)

avatar for Oreon_Necris
Oreon_Necris

Apr. 26, 2012

Under rating threshold (show) I feel like everytime i change something in my ship code everything stops working :( the ship doesn't move or shoot anymore and no enemies spawn or shoot or anything! I've been pawing over the code all day and nothing seems to be wrong with it... can someone help? pm me or something i beg of you! :p

+ - !

(1)

avatar for den1983
den1983

Apr. 25, 2012

Under rating threshold (show) i have this problem.. after i have added the collision between missile and enemy ship th rate of fire of hero ship change.. when the test begin it's only one missile but some enemy after it's 2 3 4.. any solution?

+ - !

(1)

avatar for Markonan
Markonan

Apr. 12, 2012

Under rating threshold (show) I get an error when I put the array into my code. When "enemies = [];" is put into my code the enemies stop spawning, bullets won't fire, and the background doesn't move like it's supposed to. I altered the gameplay slightly (ships coming from random locations, top to bottom, left to right, etc., bullets shooting all directions, and background moving with the ship instead of only horizontally) but no changes that I can think of that would alter it enough to do this. I tried it without the "enemies = [];" (and the "var enemies;" still created) and I don't have any problems whatsoever. I also tried it by doing "enemies = new Array();" but got the same issue. Any ideas?

+ - !

(1)

avatar for Schreib
Schreib

Mar. 10, 2012

Under rating threshold (show) It's a pretty good tutorial. I this it's the best actionscript tutorial I've ever seen personally, so thanks!

+ - !

(1)

avatar for sleepymii
sleepymii

Dec. 22, 2011

Under rating threshold (show) .....don't know if this is a re post or if my internet is acting up..... short version i need help getting the full source code, or the whole original game file: which ever it was i had before my computer bsod-ed on me. i have all i need but no file to copy the explosion from to paste into my own. all help is great thanks -i did right click and download the source code from multiple pages but none have the file i need

+ - !

(1)

avatar for poohbahthegrand
poohbahthegrand

Dec. 6, 2013

Under rating threshold (show) For whatever reason, my hitTest won work. All my code follows the tutorial exactly, but the ships and missiles just fly past each other. help?

+ - !

(1)

avatar for OUCHiambeingshot
OUCHiambeingshot

Nov. 19, 2013

Under rating threshold (show) for people having trouble getting their missiles to connect with other movie clips. Make sure that you are not typing enemy when you should be typing enemies and vice versa. Its easy to start getting them all confused,.

+ - !

(1)

avatar for OUCHiambeingshot
OUCHiambeingshot

Nov. 19, 2013

Under rating threshold (show) fixed it. I had to alter the animation itself. Not sure why though

+ - !

(1)

avatar for OUCHiambeingshot
OUCHiambeingshot

Nov. 18, 2013

Under rating threshold (show) I cant seem to get my explosion clip to play when an enemy ship is hit. my code is precise but still nothing

+ - !

(1)

  • add a comment