NPC Code:
//#CLIENTSIDE
if (playerenters || timeout) {
drawunderplayer;
setshape2 8,16,{
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22,
22,22,0,0,0,0,22,22
};
if (playerattached) {
if ((playery in |y+0,y+1| && playerdir==0) || (playery+3 in |y+15,y+16| && playerdir==2)) {
detachplayer;
playery += vecy(playerdir)*2;
}
} else if (playerx+1 in |x+2,x+5| && ((playery+0.5 in |y+0,y+2| && playerdir==2) || (playery+1 in |y+14,y+16| && playerdir==0))) {
attachplayertoobj 0,id;
// playery += vecy(playerdir)*2;
}
timeout = 0.05;
}