Why will this only work once and then stop working?
NPC Code:
if (created) {
setshape 1,32,32;
this.apos = {1.5,0, -0.5,1.5, 1.5,4, 3.5,1.5};
this.x = playerx;
this.y = playery;
this.dir = playerdir;
}
if (playertouchsme) {
toweapons weapon_Dagger;
}
if (weaponfired){
hitobjects 0.5,this.x+this.apos[this.dir*2],
this.y+this.apos[this.dir*2+1];
freezeplayer .4;
setani sword,wbow1.png;
}
thx