Under rating threshold (hideshow)
i did everything right until page 14. the enemies arent exploding when they get hit by missiles. i went back and rechecked everything but i cant find what i missed.
Under rating threshold (hideshow)
Great tutorial. However, the "Click here for more Shootorials" link doesn't work for me. Thought I'd share that so these bad links can be checked out and fixed...
Under rating threshold (hideshow)
Hey everyone! If anyone here wants to convert AS2 code to AS3 I set up a quick guide on how to do it. This uses old code that you wont want in newer projects but the site I set up will explain how to use it! http://codingflashfast.webs.com/
!!!
Under rating threshold (hideshow)
Can anyone help me? My hitTest doesnt work I've been trying for 2 days. It looks like this:
onClipEvent(enterFrame)
{
if (this.hitTest(_root.instancename))
{
this.removeMovieClip();
}
}
can't see why it doesn't work. Help would be greatly appreciated.
Under rating threshold (hideshow)
Download links is the Action Script Shootorial seems to work, use those files if you need them:
http://www.kongregate.com/games/Moly/shootorial-1-actionscript-3
Under rating threshold (hideshow)
****PROBLEM SOLVED****
If your missile is killing enemies without hitting it as soon as it gets fired, check in the "Missile.as" file, find the "onEnterFrame()" function, and take a look at the "if" condition inside the "for...in" loop; at the end of the condition declaration there shouldn't be any ";".
Example: THIS IS WRONG
if (this.hitTest( _root.hero.enemies[i] )) // NO ";" IN THE END
{
//SOME CODE
}
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)
Vind777 made a very useful comment, i tried ages to figure out, that it is only working with a different instant name.
Under rating threshold (hideshow)
If your explosion animation is looping, and you can't figure out what's wrong, make sure your Explosion.as file is saved in the same folder as your main flash file.
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)
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?
Under rating threshold (hideshow)
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
Under rating threshold (hideshow)
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?
Under rating threshold (hideshow)
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?
Under rating threshold (hideshow)
Neither Firefox nor Internet Explorer is allowing me to download the source files. Could somebody PM me a direct link?
Under rating threshold (hideshow)
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?
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)
.....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
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)
I don't know if anyone can help me out but, I'm getting this in my output
"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."
I assume it's coming from the missile because it pops that up as soon as the missile hits an enemy ship.
Under rating threshold (hideshow)
If i am reading the first page correctly....... this should be the apex of the Tutorial process, i'm very happy to have made it this far, just 5 hours ago i would have looked at these codes and went "WTF!?!?!", thank you Kongregate for your easy tutorials and helping out us new people who want to take a hand at game developing.
Under rating threshold (hideshow)
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?
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)
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"
Under rating threshold (hideshow)
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!