View Single Post
  #1  
Old 11-14-2002, 02:42 AM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
More, uhm lights :D

ningnong + bordem =

NPC Code:

// NPC made by Ningnong

if (created) this.Ok = 1;

//#CLIENTSIDE

if (timeout || playerenters){
if (this.time=>300) this.Ok = 0;
this.time++;
setarray this.x,this.max;
setarray this.y,this.max;
setarray this.speed,this.max;
setarray this.angle,this.max;
setarray this.var,this.max;
setarray this.zoom,this.max;
for (i=0;i<this.max*2-random(.1,1);i++){
this.speed[i] = .66;
this.speed[i] ++;
this.angle[i] = this.angle[i] + this.speed[i] * 0.01;
this.var[i] = .2;
this.x[i] = random(x-this.xm,x+this.xp) + cos(this.speed[i]) * this.var[i] - random(2,4);
this.y[i] = random(y-this.ym,y+this.yp) + sin(this.speed[i]) * this.var[i] - random(2,4);
this.zoom[i] = .4;
showimg i,light2.png,this.x[i],this.y[i];
changeimgcolors i,random(.1,1),random(.1,1),random(.1,1),.999;
changeimgzoom i,this.zoom[i];
}
if (this.Ok == 1){
this.max +=.1;
this.xm += .01;
this.xp += .01;
this.ym += .01;
this.yp += .01;
}
elseif (this.Ok == 0){
this.max-=.1;
this.xm -= .01;
this.xp -= .01;
this.ym -= .01;
this.yp -= .01;
}
timeout = .05;
}




Just made this, I didn't see any point in uploading the level, just a copy and paste job, and since I hadn't posted in a while I thought i'd snap something quick up :P

*EDIT*

It doesn't paste so well so heres teh lebel =)

lebel:
Attached Files
File Type: nw nn_lights.nw (10.2 KB, 219 views)
Reply With Quote