Under rating threshold (hideshow)
help. Its been fine up to this point, then suddenly its saying everything that contains "extends MovieClip" is a syntax error. any hints? cuz i'm stuck.
Under rating threshold (hideshow)
For having different kinds of enemies spawn. Try just making another actionscript file with the same coding and such, it would just have like a different instance name. Such as EnemyShip and EnemyShip1.
Under rating threshold (hideshow)
I am having a problem, I looked everywhere. I followed the tutorial as close as possible. and for some reason, the EnemyShip's wont appear at all. Does anyone have an idea to what my problem is?
Under rating threshold (hideshow)
These have been really helpful
ive been making a vertical scroller off of these and yet to have a problem that couldnt be solved without a little experimenting
Under rating threshold (hideshow)
HELP!!!
When ever I publish my game it always says this
"The class 'EnemyShip' needs to be defined in a file whose relative path is 'EnemyShip.as'.
class EnemyShip extends MovieClip {"
Under rating threshold (hideshow)
lol so picky XD. im like: "y do they appear in the upper left caorner?!?" after like 5-10 min i see the C in class enemyship extends MovieClip is a capital letter. o.0
Under rating threshold (hideshow)
@ urbano148
Try checking your enemy ship properties -> class "name" are the same as the "class "name" in the AS file.
Also check if you have linked the AS file correctly with your fla file.
check this vid: http://www.youtube.com/watch?v=B17Q1VFKW8o
(its CS4, but its the same method in CS3)
Under rating threshold (hideshow)
@Raugion
The reason is that Random generates a number between 0 and 1. If it's 0*250, It's still gonna be 0, and your ship is gonna spawn at the very bottom of the screen, If you do *200 + 50, Even if it is 0, you still have a +50 which makes it not be 0.
Under rating threshold (hideshow)
i had the same problem bn1515, i solved it adding the speed value
try this :
function onLoad()
{ speed = 10;
_x = 700;
_y = Math.random()*300;
speed = Math.random()*5 + 5;
}
Under rating threshold (hideshow)
if i put a enemyship into the stage myseld and do not delete it will fly by, but if i dont have a enemyship in the stage when it starts then no enemys come in the stage
Under rating threshold (hideshow)
if you can move, the error is in the EnemyShip.as file. Check for spelling errors, mine wouldnt work until i saw i accidently put function onEnterFram();
so check for spelling errors in that file, and it should work
Under rating threshold (hideshow)
yes theres a reason and its pretty clearly visible, if you put 250 it gives a random number between 0 and 250 instead of between 50 and 250
Under rating threshold (hideshow)
Quick Question: Instead of putting in *200 + 50 wouldn't it be simpler to just do *250 or is there a reason it doesn't have that
Under rating threshold (hideshow)
theman123321: You sure you are doing it in as3? elswise you maybe need to look over it again, make sure stuff is in the right place, cnp will probably give u errors because you put it in the wrong place/
Under rating threshold (hideshow)
@theman123321
Check to see if the way you have spelt "shootlimiter" is the same everywhere, caps on the letters matter.
Under rating threshold (hideshow)
i need help! i copies the text on the example word by word and its still giving me the "There is no property with the name 'shootlimiter'." for everyline witht the word "shootlimiter"
I think i have to create a class with the function "shootlimiter"
any ideas??
Under rating threshold (hideshow)
I've done the code over and over, and my EnemyShip code says "The class or interface "EnemyShip" could not be loaded. I don't know what's up with that, but Enemies are a huge part of shooters >.<
Under rating threshold (hideshow)
This has been one of the best thought out and well put together tutorials I have ever seen.
Thanks for all your help so far!
Under rating threshold (hideshow)
I thought I followed all of the instructions exactly, but when the enemy ship gets called to the stage, it appears in the upper left hand corner and doesn't move. Does anyone know what I did wrong?
Under rating threshold (hideshow)
i love this so damn much thanks for the tutorial! helping us noob flash learners D:
i made my own version of this game :D yayyy
Under rating threshold (hideshow)
class EnemyShip extends MovieClip
{
var speed;
function onLoad()
{
_x = 850;
_y = Math.random()*200+(Math.random()*60);
speed = Math.random()*5 + 5;
}
function onEnterFrame()
{
_x -= speed;
if(_x < -100)
{
this.removeMovieClip();
}
}
}
This is a working code for EnemyShip. You must remember to save the file EnemyShip (the name of the movie clip)
Under rating threshold (hideshow)
WOW these tutorials are awesome, with not only its great presentation, but the quality of the actual tutorials are outstanding and very educational. 10.5/10.
Under rating threshold (hideshow)
Ummm. So I understood everything and finished the tutorial but:
The number of enemy ships that spawn doubles every time they spawn. 1 enemy spawns, then 2, then 4, then 8, and so on. Any idea where I could have screwed up to cause this?
Under rating threshold (hideshow)
wait a sec here...if _y = Math.random()*200 + 50; rids of clipping what about the lower half of the screen? they will clip 50 pixels more than before? HELP!
Under rating threshold (hideshow)
Voniche,
Firstly, _y = Math.random()*200+50; is equal to between 50 and 250.
The reason these both work is that the *200 is multiplying 200 by 0-1 and then adding 50 to the total making it a minimum of 50 and a maximum of 250, and for the other one *5 is multiplying 5 by 0-1 and then adding 5 to the sum making a minimum of 5 and a max of 10.
If you follow the directions of the tutorial your * (in this case 5 and 200) will always be multiplyed by 0 or 1, then the + (5 and 50) is added to the total of the multiplication to set a limit for the variables.
Under rating threshold (hideshow)
You have to set it up as it is in the tutorial, make sure your script for the random is exact, as getting it wrong will result in them randomly appearing in the wrong places.
Under rating threshold (hideshow)
please help! I couldn't see my ships but when i maximise the game i can see my ships moving in the grey area below the stage, not on the stage. So how do i make them spawn within the background so i can see them?