|
hey guys i changed the if (timeout) to if (weaponfired) and put my own images in instead of the lazer images and i fired the weapon and nothing. Here is what the code looks like now:
if(weaponfired){
for(e=0;e<this.out;e++){
if(this.arrowact[e]==0){
if(this.arrowdir[e]==3){
this.arrowx[e]+=this.arrowspeed;
showimg e,bullet.gif,this.arrowx[e],this.arrowy[e];
changeimgpart e,1,2,29,5;
}
if(this.arrowdir[e]==0){
this.arrowy[e]-=this.arrowspeed;
showimg e,bullet.gif,this.arrowx[e],this.arrowy[e];
changeimgpart e,13,20,5,29;
}
if(this.arrowdir[e]==1){
this.arrowx[e]-=this.arrowspeed;
showimg e,bullet.gif,this.arrowx[e],this.arrowy[e];
changeimgpart e,0,12,29,5;
}
if(this.arrowdir[e]==2){
this.arrowy[e]+=this.arrowspeed;
showimg e,bullet.gif,this.arrowx[e],this.arrowy[e];
changeimgpart e,3,21,5,29;
}
this.arrowtime[e]++;
}else{
this.arrowtime[e]=this.life*20;
}
}
}
} |