something like this
NPC Code:
if(created){
showcharcter;
}
if(playerenters){
this.tilelist={*tilenumbers you got with tile[] or board};
timeout=.1;
}
if(timeout){
if(tiles[x+1.5,y+2] in this.tilelist){show;}
else {hide;}
//something like movement here
timeout=.1;
}
U don't need showcharacter it's just an example
