PDA

View Full Version : Space Invaders



Soul814
March 27th, 2004, 06:56 PM
Okay i wanted to make it smoother right so i converted my ship(button) to a movieclip... then the shooting script didnt work... heres the files

BUTTON
http://www.silver.ppnhosting.net/testing/phoneix.swf

MOVIECLIP
http://www.silver.ppnhosting.net/testing/phoneix2.swf

DOWNLOAD FLAS
http://www.silver.ppnhosting.net/testing/

----
Other Problems
1) The enemies / boxes for now, they arent even after a while.
2) I don't know how to shift them down...

tommythewolfboy
March 29th, 2004, 06:24 PM
You need to change the space button callback to reference _root.i, not the i - otherwise the if (this != _level0.bullet)' condition in the bullet onEnterFrame event will never be met.

onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)) {
if (_root.shootonce) {
// set fire to be true
_root.fire = 1;
//increment root var i every time a shot is made
_root.i += 1;
//set shootonce to be false, so that no shot can occur until reset
_root.shootonce = false;
duplicateMovieClip(_root.bullet, "bullet"+_root.i, _root.i+99);
}
}

Hope that makes sense. I'll post the fla if you want me to. :¬)

t

Soul814
March 29th, 2004, 09:26 PM
yep thanks... i fixed it... now i have two more things before i start making graphics :P

1) Enemy Fires
2) If you destory most of the enemies it doesnt move all the way to the side... i'll try to get a picture to illustrate

-- enemy fires = phoneix3

tommythewolfboy
March 30th, 2004, 06:28 AM
1) what was the question about enemy firing?
2) no need, I think I know what you mean - I'll try and have a look tonight when I get home

Carnophage
March 30th, 2004, 01:25 PM
Increase the frame rate, maybe to 25:D

Soul814
March 30th, 2004, 05:20 PM
ummm it doesnt seem to loop through... the last enemy # 30 keeps firing... look at the swf and you'll see

Soul814
April 2nd, 2004, 05:15 PM
ehh anyone have any clues?