Thread: Baddy Bug
View Single Post
  #1  
Old 11-02-2003, 03:55 AM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
Baddy Bug

Hey, I was just making a script for having baddies drop random stuff, but it doesn't seem to work. I have tried killing the baddies multiple times to get out of the random situation, but it will not drop anything! Can anyone shed any light on this? Oh, and here's the script:
NPC Code:

if (playerenters) timeout = 0.05;
if (timeout) {
deadcheck();
timeout = 0.05;
}
function deadcheck() {
for (i=0;i<compuscount;i++) {
if (compus[i].mode==9) {
pi = random(0,100);
if (pi<10) lay2 greenrupee,compus[i].x,compus[i].y;
else if (pi<20) lay2 bluerupee,compus[i].x,compus[i].y;
else if (pi<30) lay2 heart,compus[i].x,compus[i].y;
}
}
}

__________________
Reply With Quote