on the frame of my game i have this
Mainly to make my bullets
score=0
_global.laserspd = 10;
_global.laserMove = 1;
_global.allow = 0;
_root.laser._x = -70;
_root.laser._y = 494;
onEnterFrame = function () {
if (Key.isDown(Key.SPACE) && (_global.allow == 0)) {
laser = _root.attachMovie("laser", "laser"+_root.getNextHighestDepth(), _root.getNextHighestDepth());
i++;
if (_root.ship._xscale>0) {
//ie facing right
laser._x = _root.ship._x+45;
laser._y = _root.ship._y;
_global.allow = 1;
}
}
laser.onEnterFrame = function() {
this._x += 30*_global.allow;
if (this._x>=600 || this._x<=-50) {
this.swapDepths(999);
removeMovieClip(this);
_global.allow = 0;
}
};
};
but now i want to put this in aswell the problem is when i put this in i cant shoot any suggestions as to y?
//duplicate Enemy
var ticks:Number = 0;
var dupetime:Number = 30;
var i:Number = 1000;
_root.onEnterFrame = function() {
ticks++;
if (i>1100) {
i = 1000;
}
if (ticks == dupetime) {
duplicateMovieClip(_root.enemy, "du"+i, 1+i);
i++;
ticks = 0;
}
};