10-24-2001, 07:07 AM
|
Registered User
|
Join Date: Jun 2001
Location: banana
Posts: 165
|
|
// NPC made by Pikaz (RC)
if (created)
{
this.berrycount=4;
}
if (playerenters) {
this.berrycount=4;
drawunderplayer;
}
timeout=2;
if (timeout&&this.berrycount<4)
{
this.berrycount=this.berrycount+1;
timeout=2;
}
if (actionberry&&this.berrycount>0) {
this.berrycount=this.berrycount-1;
setstring client.berrycount,#v(strtofloat(#s(client.berrycou nt))+1);
}
//#CLIENTSIDE
if (actionberry&&this.berrycount>0)
{
if (playerdir==0) { putleaps 0,playerx+0.5,playery-1; };
if (playerdir==1) { putleaps 0,playerx-2,playery+1; };
if (playerdir==2) { putleaps 0,playerx+0.5,playery+2.5; };
if (playerdir==3) { putleaps 0,playerx+3,playery+1; };
}
timeout=2;
if (timeout)
{
if (this.berrycount==4)
{setimg bushred4.gif}
if (this.berrycount==3)
{setimg bushred3.gif}
if (this.berrycount==2)
{setimg bushred2.gif}
if (this.berrycount==1)
{setimg bushred1.gif}
if (this.berrycount==0)
{setimg bushred0.gif}
timeout=2;
}
if (created)
{
setgif bushred4.gif
}
ok here i switched it to this. now the image bushred0.gif keeps showing up even though i have it set as this.berrycount=4 at the begining. Also if hnage it to if (this.berrycount>-1) i get the leaps but this.berrycount doesn't subtract any or does the string add to it self.(of course as stated above this all does work offline) |
__________________
|
|
|