NPC Code:
timereverywhere;
if (created) {
setarray lights,300;
for(this.i=0;this.i<301;this.i+=3
{
lights[this.i] = random(0,64);
lights[this.i+1] = random(0,64);
}
}
while (zero==0) {
for(this.i=0;this.i<300;this.i+=3
{
showimg this.i+200,light2.png,lights[this.i],lights[this.i+1];
changeimgcolors this.i+200,int(random(0,1.5)),int(random(0,1.5)),i nt(random(0,1.5)),random(.5,.99);
changeimgzoom this.i+200,random(.5,1.25);
this.random=random(0,2);
if (this.random>1) {
lights[this.i]+=random(0,.5);
lights[this.i+1]--;
}
if (this.random<=1) {
lights[this.i]-=random(0,.5);
lights[this.i+1]++;
}
if (lights[this.i+1]>=62) lights[this.i+1] = 2;
if (lights[this.i]>=62) lights[this.i] = 2;
if (lights[this.i+1]<=2) lights[this.i+1] = 62;
if (lights[this.i]<=2) lights[this.i] = 62;
}
this.i = 0;
sleep .05;
}