NPC Code: // NPC made by screen_name if (created) { this.counter=0; this.on=1; timeout=.1; } if (timeout&&this.on==1) { if (this.counter%2==0 && playerhearts>.5) { playerhearts-=.5; } this.counter++; timeout=.1; }
// NPC made by screen_name if (created) { this.counter=0; this.on=1; timeout=.1; } if (timeout&&this.on==1) { if (this.counter%2==0 && playerhearts>.5) { playerhearts-=.5; } this.counter++; timeout=.1; }