Under rating threshold (hideshow)
Still stuck on trying to make the hero's ship missiles to hit and explode the enemies, i check all the coding and i see no mistakes any help? i using cs5
Under rating threshold (hideshow)
I just noticed that when you change the EnemyShip code to for the EnemyMissile, the code changes the y that the enemy appears from back to: *300, when you have changed it to *200 + 50 in a previous Shootorial. Hope this helps someone.
Under rating threshold (hideshow)
In step 10 I got boned for a couple hours because I didnt see that there is a space after 'in', before '_root.ship.enemies' in line 14. So I researched for hours learning about basic for statements and advanced for statements, which this is. So thats the plus side. On the negative side, I'm a total moron lol :P
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)
when I type the "enemies.push(enemy)" part and then test my movie, it says :
There is no property with the name 'enemy'.
enemies.push(enemy);
Under rating threshold (hideshow)
I haver the same problem as Night warrior, I got past the other problem but there is no explosion.png just the actionscript file.
Under rating threshold (hideshow)
Got up to page 4, tested it, and nothing worked... at all, I couldn't move my ship, fire and there was no enemies. This was all after I put in the line of code to do the explode function. Help please....
Under rating threshold (hideshow)
My ship won't shoot any enemies, my missiles just goes right though them :P Could it be a missing instance name for the Enemies or my Missiles?
Under rating threshold (hideshow)
My functions won't work. It seems to be related to what headlessgargoyle said, that I need to define my function. However I put my function next to my variables, it won't work. Can annyone help me with this? (By the way, yes I'm using cs4)
Under rating threshold (hideshow)
Everything is working fine, except my Enemy Missiles aren't firing across the scene. They appear, then stop. Nothing else. Help?
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... :/
Under rating threshold (hideshow)
my explosion keeps appearing in the top left hand corner and disappears, it wont appear where the enemy ship was at! please help!
Under rating threshold (hideshow)
So I feel like I have to be missing something incredibly monumental, because my missiles seem to pass through every other enemy. I'm not sure what I've done wrong but the name of my incidences is correct I believe. Can anyone help me? This has gotten rather frustrating...
Under rating threshold (hideshow)
it would appear that (judging by others comments) that anyone using macromedia flash 8 cannot load up the source files once downloaded. could anyone post it so that those with macromedia can carry on with this tutorial. it's a bit annoying that after getting this far i'm being held back by software... thanks
Under rating threshold (hideshow)
aah.. source files downloaded but now i'm unable to open SH_05.fla it says "Unexpected file format." i'm using macromedia flash 8 if that has anything to do with it. PLZ HELP!
Under rating threshold (hideshow)
@krinsmnite: it's probably to do with the frame rate of the game being different to the frame rate of your explosion. but that's just a guess
Under rating threshold (hideshow)
im using cs5 and i think u have to declare functions before you use them in the main loop but i cant find how to do that...anyone know the syntax?
Under rating threshold (hideshow)
i put in a instance name in for ship.then publish the ship will not move and the enemys dont show up. anyone have this problem help
Under rating threshold (hideshow)
if you're using flash cs4, you have to define the function before it's use in the onEnterFrame() function. as such put it by your variables, easy fix just letting you all know
Under rating threshold (hideshow)
My issue was fixed! Turns out I had a comma after the second "Missile" before the + in the Ship's attach Missile mc script.
Sorry for posting 3 times here :c
Under rating threshold (hideshow)
I had it set to 30 fps. I ended up exporting it as a flash movie instead of a gif. For some reason I can not get the gif to run correctly, even with extra frames added. But, after some tweaking, I got it to work with a flash movie.
Under rating threshold (hideshow)
I am having another problem however. My EnemyShips only explode if I hit, for example, the third EnemyShip with my third Missile. If I miss an EnemyShip, and then hit the THIRD EnemyShip with my FOURTH missile, there is no more collision detection. I've triple checked my for...in code and the enemies array code and can't find a fault. Any ideas?
Under rating threshold (hideshow)
@krinsmnite, are you exporting your explosion from another Flash file? The default frame rate in Flash is 12 fps, and I assume that's what your explosion is being exported at. The game is ran at 30 fps.
You can change your frame rate in your explosion file to 30 and double-frame it or something, that's what I did lol.
Under rating threshold (hideshow)
I hate to spam, but I'm updating my progress. I've tried making the explosion in gif, swf, everything. It plays fine normally, but, after I import it into this game, it plays far too fast. I can't find any info on google or in the help about this.
Under rating threshold (hideshow)
make sure your enemy ship has the right scrip under Function Explode() and that Function Explode is in the right place
Under rating threshold (hideshow)
@ bufferOverflow i may be wrong but i think the number is removed when the instance of that ship is removed because its a local variable tied into that ship so enemyX should be tied to arrayX
Under rating threshold (hideshow)
Alright I need help if anyone can assist... I cannot get my function explode() to attach to this.removeMovieClip If I replace "{explode();}" with "{this.removeMovieClip}" it functions properly and removes enemy ship on impact of ship but with explode they just pass right through each other and no impact collision... So.. what am I doing wrong?
Under rating threshold (hideshow)
@ 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 :(
Under rating threshold (hideshow)
There is a problem with this tutorial scenario. If you create an array that holds the enemies, and add one whenever it appears on the stage, shouldn't you also remove them from the array when they are destroyed? The way it's described, it's a performance leak - Every missile will loop through the list of many enemy ships, even if they have left the screen or have been destroyed. Did I miss something?