Under rating threshold (hideshow)
sorry guys, i have a problem with the " hitTest() " function. I checked the cod a billion time, but everytime my hero ship fires a missile, the bullet appears for a millisec and vanishes, and ANY enemy is destroyed (despite of its "_x" and "_y"). Basically, the missiles are fired and make the enemy explode as soon as they're fired, without phisically hitting it.
Under rating threshold (hideshow)
If you loaded the downloadable source and your missiles won't hit anything, go to Control > Clear Publish Cache and Test Movie.
Under rating threshold (hideshow)
for some reason the this.hitTest(_root.ship) if statement won't return true... it is in the onEnterFrame function... anyone have any idea what is going wrong?
Under rating threshold (hideshow)
Thank you kongregate! Hey guys this is the game half completed I didnt have time to completed correctly but if you guy want to check it out this is the link: http://www.kongregate.com/games/Filippo2bt/spaceknight the art was also made by me thats why it took me a little more time and also please any help comment. Enjoy! :)
Under rating threshold (hideshow)
Please help, the enemy missiles spawn move about 10 pxles then freeze and disapper, and the hero ships missiles dosn't blow up the enemy ship, I have tried everything, but nothing works, I also have replacedthe original classes whit the classes from the download.
Under rating threshold (hideshow)
@SlayerOfPersians I almost had that problem... I accidentally put it in in a way that my second ship launching code was completely separate from the first, and was launching one each frame... I caught on when I was getting 61 enemies every two seconds instead of 1.
Under rating threshold (hideshow)
Hi guys. When I try to use ._currentFrame and ._totalFrames there is an error that reads: "there is no property with this name". Help plz
Under rating threshold (hideshow)
Got another question, im not using the downloads with this, im making all that myself so i can learn it too, does anyone know a good animation tutorial, i looked on the web but cant find anything that seems to help/work
Under rating threshold (hideshow)
well i tried this and i got to the point with the explosion and now my game just flashes every few seconds, its just white and then for like 1 frame the game shows, and then goes white again, i deleted everything i had added before this and it still does it, someone PLEASE help me, ive been working for the whole day on this and i really dont want to have to start over only to make another damn mistake
Under rating threshold (hideshow)
@jumpking55, that's because we are trying to access to a variable array which if you remember we have it defined in the ship. it's very wise to store it there because always will be the ship instance before any missile or enemy, so we can assure that the array enemies exists. Notice that is like a path, you can say: "from the root timeline (the main one), look for the ship, then inside it, give me the array enemies". I hope this helped. :P
Under rating threshold (hideshow)
I don't know why the for..in loop is still not working for me... the instance's name is zhip, I added enemies.push(enemy); in the class Ship right after creating a new enemy (syntax test is ok). But in the Missile class on the very first line of the loop for(var i in _root.zhip.enemies) it founds and error, says class definition doesn't allow this declaration.
Please help! =(
Under rating threshold (hideshow)
@wowguy102
@Azer1652
Make sure the instance name of your hero ship is different than its class name, and make sure that the code
if(this.hitTest(_root.ship))
instead of putting (_root.ship)), replace "ship" with the instance name (make sure casing is correct, too)
Under rating threshold (hideshow)
when i shoot the enemies, some of them dont even get affected, but when i shoot some of the others, they get shot. Can someone plzhelp? I literally copied the code into all my files, annd nothing got affected. Plz help!!!
Under rating threshold (hideshow)
I NEED HELP!!!! when i click on the download for the sources nothing comes up and i want to advance on my game so can someone tell me a link or a way to fix this problem
Under rating threshold (hideshow)
I need help, i just finish the tutorial # 5 and now my ship can't move no more. With the thing I added. Only the background still working (Defile). Anyone got a idea why my game isn't working well now?
Under rating threshold (hideshow)
ok i downloaded the source file, extracted it, but i don't find the explosion clip. Ya, it says from the fla file, but i got no fla file. Please help, i'm loving this thing and now i'm stuck here!
Under rating threshold (hideshow)
I made my explosion really really really big and didn't make it a clip so it only lasted for one frame. It adds a nice touch, whenever you hit an enemy it looks like an explosive balloon bursting. Try it.
Under rating threshold (hideshow)
Morning. I have problem in step 4. The Enemy ship stopped arriving to frame and the Hero ship cannot move or shot. (But the background still moving...) anyone know how to solve it?
Under rating threshold (hideshow)
I fixed my problem by making sure that the X and Y coordinates of the symbols are the same, and to make sure to have the...
explosion._x = _x;
explosion._y = _y;
written out correctly.
Under rating threshold (hideshow)
Help, I'm on Step 7 when you add the explosion animation to your enemy ship, but when I run into it, the explosion happens left and down from where the actual enemy is. What should I do?
Under rating threshold (hideshow)
Using CS5, I was able to copy the explosion animation directly out of their .fla and already have everything linked up to my Explosion class
Just thought I'd share this information
Under rating threshold (hideshow)
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?
Under rating threshold (hideshow)
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.
Under rating threshold (hideshow)
Ok i figured out that all my functions stop working when i change my ships instance name to "Ship". Can someone tell me why?
Under rating threshold (hideshow)
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?
Under rating threshold (hideshow)
Nvm, I got it to work with AlmightyGERM's advice... I had to make the instance name differ from the class name. Strange world o.o Maybe it's because I'm using cs5 lol
Under rating threshold (hideshow)
When I add the instance name to the ship everything stops working except my background. Many other people having the same problem but those many other people have many different solutions :(
Under rating threshold (hideshow)
Can someone upload a pic or txt file containing what the ship.as should look like? i somehow messes mine up, been checking it for the past 30 minutes and can;t find anything... :/