All pastes #255179 Raw Edit

Miscellany

public text v1 · immutable
#255179 ·published 2006-11-22 18:42 UTC
rendered paste body
stop();
increment=108
cd=1
_root.health=100
this.onEnterFrame=function(){
	increment++
	disx= this._x-_root.player._x
	disy= this._y-_root.player._y
	if(this._x>=_root.player._x-100){
		this._x-=disx/100
		this._xscale=100
	}else{
		this._x+=-(disx)/100
		this._xscale = -100
}
if(this._y>=_root.player._y){
	this._y+=-(disy)/100
} else if(this._y<_root.player._y){
	this._y-=disy/100
}

if(increment%72==0 && Math.abs(_root.enemy._y - _root.player._y) <= 50){
	_root[enembul].duplicateMovieClip ("enem"+ cd, cd);
	_root["enem"+ cd].onLoad=function(){
	this._x=_root.enemy._x-30
	this._y=_root.enemy._y-150
	this.bullettoplayer=_root.player._x
	if(this._x>=this.bullettoplayer-100){
		this._xscale=100
		this.mov=-10
	}else{
		this._xscale=-100
		this.mov=10
}
}
cd++
}

for(z=1;z<cd+1;z++){
if(_root.player.hitTest(_root["enem"+z])){
		_root.barohealth._xscale-=1
}else if(_root.barohealth._xscale<=1){
		_root.barohealth._visible=false
		_root.player.gotoAndPlay(3)
}
_root["enem"+ cd]._x+=_root["enem"+ cd].mov
}
if(_root.health==0){ 
		this.gotoAndStop(2)
}
}