I am trying to script rain. Here is what I used for one drop:
NPC Code:
if (created) {
setbackpal dusk7.png;
putnpc rainimage.gif,rain.txt,this.x = (random(0,64)),this.y = (random(0,64));
timeout=0.05;
}
if (timeout) {
putnpc rainimage.gif,rain.txt,this.x = (random(0,64)),this.y = (random(0,64));
timeout=0.05;
}
In rain.txt I have:
NPC Code:
if (created) {
sleep 0.05;
destroy;
}
I paste the NPC a couple times and the NPC is always on the coordinate (1,1). How can I fix this?