Games Achievements My Kong Sign In

Comments for Shootorial #5

« Back to Shootorial #5

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)

notmyid

Nov. 13, 2010

Under rating threshold (show) "this statement is not permitted in a class definition" Got that in EnemyShip.as, err, disables everything I've done in past shooturials =/ Not sure what to do, I'm using CS5, as2, anyone could message me with some help? Thanks!

+ - !

(1)

cypherstim

Nov. 10, 2010

Under rating threshold (show) the collision detection in my game works, but only on the ships. the missiles just fly by without any reaction. my code is this: class Missile extends MovieClip{var speed;function onLoad(){ speed = 20;}function onEnterFrame(){_x += speed;for(var i in _root.ship.enemies){if(this.hitTest( _root.ship.enemies[i] ) ){this.removeMovieClip();_root.ship.enemies[i].explode();}}if(_x > 600){this.removeMovieClip();} }} Is anything wrong with it?

+ - !

(0)

Fultoa

Nov. 04, 2010

Under rating threshold (show) My code is perfect, but the enemies just immediately disappear when I have the code like that in the "EnemyShip". If I change it around, they will fly by, but they won't explode on contact, what should I do to fix this, please message me if possible.

+ - !

(1)

narfnin

Oct. 28, 2010

Under rating threshold (show) FFFFF---- When I add the array and missile stuff, BILLIONS of ships appear! AND THEY ARE INVINCIBLE!!! WHAT DO?!

+ - !

(1)

hastingsfc12

Oct. 28, 2010

Under rating threshold (show) hai im making my own game 100% by me so how do u make ur own explosion thingy? would help lots thanks

+ - !

(1)

NinjaPirate426

Oct. 28, 2010

Under rating threshold (show) Ok, I fixed my earlier problem. But now my missiles wont hit the enemy. can someone please tell me how to fix this. My code is the exact same as the tutorials.

+ - !

(0)

NinjaPirate426

Oct. 27, 2010

Under rating threshold (show) Ok i figured out that all my functions stop working when i change my ships instance name to "Ship". Can someone tell me why?

+ - !

(0)

NinjaPirate426

Oct. 27, 2010

Under rating threshold (show) Ok, this tutorial has been working really well for me. And I dont think its this tutorials fault, but all my stuff just stopped working. Before this one my ship was flying and shooting, and enemies were being randomly generated. But after I added the collision detection everything stopped working. The only thing that does still work is my background. can anyone help me out please?

+ - !

(0)

CARL_JHONSON

Oct. 27, 2010

Under rating threshold (show) WHAT THE HELL IS THIS

+ - !

(-1)

hastingsfc12

Oct. 27, 2010

Under rating threshold (show) well added in the code savede it checked it but the collision wont work :/

+ - !

(0)

Olimar72

Oct. 13, 2010

Under rating threshold (show) Ok my ship is killing the enemy ships, but now my missiles will only kill some of the ships... Roughly 1 in every 6 enemy ships will be hit by my bullet. The rest wont...

+ - !

(0)

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)

Angloki

Oct. 13, 2010

Under rating threshold (show) To anyone concerned about collision detection - be careful with naming and targetting correctly. You may use targetPath ( http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001827.html ). I've had similar problem.

+ - !

(0)

tsunimo

Oct. 12, 2010

Under rating threshold (show) i dont get it... my code it perfect but they arnt dissapearing when i run into or shoot them... they just fly over me

+ - !

(-1)

Havv

Oct. 10, 2010

Under rating threshold (show) War Hammer69: You need a for loop. for (i=0, i< someArray.Length, i++){ /* detect collision code */ }

+ - !

(1)

mustard876

Oct. 10, 2010

Under rating threshold (show) this is messed, i can't create my own function. i can't create explode() inside the onEnterFrame() function.

+ - !

(-2)

DowntownVL

Oct. 10, 2010

Under rating threshold (show) I lol'd, when every programming was done, i tested the movie. What happend? The enemies came flying normal, but then they shot a missile and they suddenly exploded. There was also a white missile of mine in front of them, even if i hadn't shot any missiles.

+ - !

(0)

Personnel

Oct. 08, 2010

Under rating threshold (show) mustard, if your explode() function wont work, make sure to create that function in the enemy ship's class. go outside the onFrameEnter block and type function explode() and braces with code in it. this.removeMovieClip() only deletes it. AND STOP ADVERTISING THE EFFING SITE! I DONT GIVE A FLYING *is cut off because of profanity*

+ - !

(1)

mustard876

Oct. 08, 2010

Under rating threshold (show) When i did: if(this.hitTest(_root.ship)) { explode(); } the enemy ships wouldnt disappear when i crashed into them. If you are having the same problem, try writing this command instead: if(this.hitTest(_root.ship)) { this.removeMovieClip(); } It worked for me. Using the above command, the part where you create the function "explode()" won't be needed.

+ - !

(-1)

War_Hammer69

Oct. 04, 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)

GoldenHaze

Oct. 03, 2010

Under rating threshold (show) can't seem to get the sound effects

+ - !

(0)

dylanj70

Oct. 02, 2010

Under rating threshold (show) never mind i got it! (this is so cool!!!!!!!)

+ - !

(-1)

dylanj70

Oct. 02, 2010

Under rating threshold (show) do you need the source iles to make the game?

+ - !

(-1)

DowntownVL

Sep. 26, 2010

Under rating threshold (show) For MTB666: Give the ship another instance name like "shipp", and use that name in the AS also. Worked for me.

+ - !

(1)

jimjimmy1995

Sep. 25, 2010

Under rating threshold (show) Yay fixed it!!! dunno wot i did

+ - !

(0)

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)

ArtCrusade

Sep. 25, 2010

Under rating threshold (show)

+ - !

(-13)

kfunkapotamus

Sep. 24, 2010

Under rating threshold (show) I'm stuck on page 10 :-\ my missiles fly right through the enemies, the missile hitTest doesn't seem to be doing it's job. any suggestions?

+ - !

(0)

rosslyn568

Sep. 23, 2010

Under rating threshold (show) check out my shooturial inspired game at http://www.kongregate.com/games/rosslyn568/planet-defender

+ - !

(-2)

Gantar180

Sep. 18, 2010

Under rating threshold (show) I followed everything exactly the way the tutorials said, all of the way up to the health bars and the scores, but after adding those then every time I destroy an enemy ship then it destroys all of them on the screen... Its so annoying and I have back tracked to check the codes and everything is exactly the way it should be... Does anyone know how to fix this?

+ - !

(0)

Sackzement

Sep. 17, 2010

Under rating threshold (show) I added a function in the EnemyShip class, which removes the EnemyShip from the enemies array in the Ship class, when it is destroyed or moves out of scope. This can make a difference in performance if you use big arrays. Here' the function: function removeFromArray() { for(var i in _root.ship.enemies) { if(this == _root.ship.enemies[i]) { _root.ship.enemies.splice(i,1); } } } Add it somewhere in the EnemyShip class and execute it when the ship is destroyed or moves left out of the stage.The splice(a,1) function removes 1 object on the a-th position from an array. Since I'm new to Flash a pro should take a lot at this and correct me if I'm wrong.

+ - !

(1)

giamps

Sep. 11, 2010

Under rating threshold (show) Fantastic tutorial , but may be there is one error : "right click on the explosion clip in the library and choose : Linkage" , I think "properties".

+ - !

(3)

juggalokid98

Sep. 10, 2010

Under rating threshold (show) my only prob is collision, I tried over and over again but it's not working... damn thing

+ - !

(0)

la8ball

Sep. 07, 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)

Fantasticalism

Sep. 06, 2010

Under rating threshold (show) on every shootorial, almost all of the comments are "OMG HELP ME I CAN"T FIGURE THIS OUT!" or something. I have only had 1 trouble, and that was figuring out how to make an explosion animation, but i figured it out, so you people need to stop complaining and figure it out yourself.

+ - !

(0)

bigauburnfan101

Sep. 02, 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)

MTB666

Sep. 02, 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 =)

+ - !

(35)

basenjilover

Aug. 31, 2010

Under rating threshold (show) ok...

+ - !

(-1)

Supersnail200

Aug. 31, 2010

Under rating threshold (show) Um..BBvn...this is comments, they are for comments on the game.

+ - !

(0)

Brotha_C

Aug. 28, 2010

Under rating threshold (show) Stop downrating poor 12sea21. Jeez lol.

+ - !

(2)

generalivan1

Aug. 27, 2010

Under rating threshold (show)

+ - !

(-4)

TheTinger

Aug. 27, 2010

Under rating threshold (show) hey, i am stuck on pg 5, it says to right click on the clip in the library and choose "linkage..." nut it isnt there....

+ - !

(2)

12sea21

Aug. 25, 2010

Under rating threshold (show)

+ - !

(-7)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-5)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-5)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-5)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-6)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-4)

12sea21

Aug. 24, 2010

Under rating threshold (show)

+ - !

(-4)

  • add a comment
Developers Players Support YouTube TikTok X (Twitter) LinkedIn
Join the conversation Join Discord
Terms Privacy Code of Conduct
© 2024 Kongregate