![]() |
I was bored so I made a little chicken in 15 minutes that clucks and gets scared if you pelt it, shoot it, or slash it.
It doesnt die, so no animals were harmed. you need chicken_w.gif and chicken_e.gif , also I gotta fix the showimg for a diagonal and left cuz the onwall is fine but the chicken still overlaps. oh well. // NPC made by LiquidIce //Chicken- //can be hit with objects , shot, or slashed // and will cluck and go kinda crazy and cluck for // about 5 seconds or so. //Made for Unholy Nation if (playerenters) { this.speed=.3; if (isleader) { setimg chicken_w.gif; } timeout = .1; blockagain; } if (playertouchsme||waspelt||washit||wasshot) { blockagainlocal; if (this.speedychicken=0) { this.speed*=2.5; this.speedychicken=1; this.speedycount=0; } } if (timeout) { if (this.speedychicken=1) { setcharprop #c,cluck cluck!; this.speedycount+=1; if (this.speedycount=55) { setcharprop #c,; this.speed=this.speed/2.5; this.speedychicken=0; this.speedycount=0; } } this.tendencymove=random(0,15); if (this.tendencymove<3) { this.dir = random(0,9); } //left if (this.dir<1) { if (!onwall(x+1.5-(this.speed*2),y+1.5)) { x-=.7; setimg chicken_w.gif; } else { this.dir = random(0,9); } } //right if (this.dir>1&&this.dir<2) { if (!onwall(x+1.5+(this.speed*2),y+1.5)) { x+=.7; setimg chicken_e.gif; } else { this.dir = random(0,9); } } //diagonal up-left if (this.dir>2&&this.dir<3) { if (!onwall(x+1.5-(this.speed*2),y+1.5-(this.speed*1.5))) { x-=.7; y-=.7; setimg chicken_w.gif; setcharprop #c,cluck cluck!; } else { this.dir = random(0,9); } } //diagonal up-right if (this.dir>3&&this.dir<4) { if (!onwall(x+1.5+(this.speed*2),y+1.5-(this.speed*1.5))) { x+=.7; y-=.7; setimg chicken_e.gif; } else { this.dir = random(0,9); } } //diagonal down-left if (this.dir>5&&this.dir<6) { if (!onwall(x+1.5-(this.speed*2),y+1.5+(this.speed*1.5))) { x-=.7; y+=.7; setimg chicken_w.gif; setcharprop #c,cluck cluck!; } else { this.dir = random(0,9); } } //diagonal down-right if (this.dir>7&&this.dir<8) { if (!onwall(x+1.5+(this.speed*2),y+1.5+(this.speed*1. 5))) { x+=.7; y+=.7; setimg chicken_e.gif; } else { this.dir = random(0,9); } } timeout = .1; } |
Cluk Cluk?
|
| All times are GMT +2. The time now is 10:42 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.