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;
}
}
}