Under rating threshold (hideshow)
add comments to your code so you can remember what you learned
like this:
// comment
or
/*
comments
comets
comments
*/
Under rating threshold (hideshow)
nvm, fixed it but, what if i want to add different enemies, but dnt want them to come out at the same time, i want the enemy timer to add either the enemy ships or the other enemy, how i do that?
Under rating threshold (hideshow)
hey guys im getting this error: This statement is not permitted in a class definition. for this source:if(enemyTimer > 60)
and the same error for this source:enemyTimer += 1;
plz help, wat should i do? i followed the instructions from the tut exactly, copy and paste... :)
Under rating threshold (hideshow)
typo on page 2 ?? last sentance "but we dont need ay enemy ships on stage..." hopefully have my own game done in a few months .. i doing a game development course at college too xD
Under rating threshold (hideshow)
check your background.It may ALSO have the instance name"ship" or "Ship" if it does, then remove it.Took me a long time to figure out:P
Under rating threshold (hideshow)
if i wanted to have multiple enemies, types so to speak, would i have to basicly copy these lines with the class names different like enemyship2 or what not
Under rating threshold (hideshow)
For those who seem to have correctly copied the code, but have errors:
Perhaps you are missing one of these: ; { } ( ) Or perhaps you have put parts of code in the wrong place.
Remember: Computers are the most stupid things you could possibly "talk to". If you don't "speak" their language perfectly flawless, they will not understand you.
Under rating threshold (hideshow)
For those of you who are trying to do this in AS3, I advise you make destructor methods, and even consider making an abstract parent class that handles all of your necessary parameters automatically (speed, registering EnterFrame, a generic destructor method). Also, if you are having trouble with a ship always appearing in the begining, that is because you didn't delete the enemy ship from the first frame. This was tough for me, because I couldn't find it behind my own ship.
Under rating threshold (hideshow)
I have all the codes right, as far as I know, but when I test it, the ships just appear in random places for a split second and disappear, it never stops... How do I fix this?
Under rating threshold (hideshow)
just can't get this to work. no matter what x and y coordinates i set the ship at, it appears in the upper left corner and stays put. on on cs5
Under rating threshold (hideshow)
enemyTimer += 1;
if ( enemyTimer > 60) {
enemyTimer = 0;
_root.attachMovie("EnemyShip", "EnemyShip"+_root.getNextHighestDepth(), _root.getNextHighestDepth());
}
i cant get my ships to come....
Under rating threshold (hideshow)
I know a lot of people have said this already but, i cannot get enemy ships to appear. the only way i have gotten it to work is by placing one on the stage. I have checked the code several times, i have deleted and remade the enemy ships movieclip several times, and it still doesn't work please pm me with an answer if you have one.
Under rating threshold (hideshow)
If you want to make it so that the furthest up/down is only just touching the edge, try "_y = Math.random()*264 + 18;".
Under rating threshold (hideshow)
Flashsoldier, I'm gonna cut you some slack because you are new here. But spamming your problem won't help.
You probably put if(enemytimer < 60) instead of if(enemytimer > 60)
Under rating threshold (hideshow)
@randomguy1273: When you create a new file, you have to select 'ActionScript 2.0.' These tutorials are made for Actionscript 2.0, so make sure you are using that, not the current version, which is 3.0. Hope that helps! :P
Under rating threshold (hideshow)
When I tried this, my ship wouldn't move and the enemies would not come out. I moved the command on my ships code that controlled the enemies so it was in the same { }'s as the Key.Right, Key.Left section. Works like a charm :D
Under rating threshold (hideshow)
Odd the enemy works when i place one on screen which means its the coding for one apearing at random which is faulty...
Under rating threshold (hideshow)
Nevermind, I found it. I had a greater than sign as a less than sign. I should have had:
if (enemyTimer > 60), but instead I had:
if (enemyTimer < 60)
Under rating threshold (hideshow)
When I load my project everything works, except that there are hundreds of enemy ships rather than just a few, I don't know what I have done wrong. Please help me.
Under rating threshold (hideshow)
Sick of getting this message "The class or interface 'EnemyShip' could not be loaded." what should i do plz message me
Under rating threshold (hideshow)
Hey guys I copied everything and all. But the enemy sprites don't appear on the right side of the screen. Help please... and thanks in advance!
Under rating threshold (hideshow)
xD on the part where you make the player create the enemy, i also tested it and went and fixed the enemy ship where it spawns half off the screen. i go to the next step and it tells me to do exactly what i did
Under rating threshold (hideshow)
EASIEST SHOOTORIAL SO FAR... who new that flash was so simple yet powerful?? i mean it's all just logic and problem solving... just my kind of work. YES FLASH!
Under rating threshold (hideshow)
@boometh: had the same problem with my missiles in shootorial 3. however when i'd completely finished that shootorial i just deleted the missile and then the layer the missile was in and it still worked.. not sure if this will help in your case but it's worth a try...
Under rating threshold (hideshow)
Never mind, I found it 2 minutes after I posted this comment. For anybody who knows where to place the code _y = Math.random()*200 + 50; you place it in this section.... -> function onLoad()
{
_x = 700;
_y = Math.random() * 200 + 50;
speed = Math.random() * 5 + 5;
}
on the enemy ships code
Under rating threshold (hideshow)
Would anybody know where to place the code.... _y = Math.random()*200 + 50; It says it at the end of the tutorial but Ia m not sure exactly where to place it.