NPC Code:
if (timeout&&this.loop=2){
if (this.key5=true){
this.hits+=1;
showimg 0,@@c@SUCCESSFUL,screenwidth/2,screenheight/1-10;
changeimgvis 0,4;
this.key1=false;
this.key2=false;
this.key3=false;
this.key4=false;
this.key5=false;
displaycraft();
sleep 2;
this.loop=1;
timeout=1;
}
else{
showimg 0,@@c@FAILED,screenwidth/2,screenheight/1-10;
changeimgvis 0,4;
this.key1=false;
this.key2=false;
this.key3=false;
this.key4=false;
this.key5=false;
displaycraft();
this.loop=1;
timeout=1;
}
}
For some reason, even though this.loop=1, the timeout still continues to execute the script

.