Thread: Help Me!!!
View Single Post
  #20  
Old 08-04-2001, 09:59 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Quote:
Originally posted by LiquidIce00
a sweet thing is to make glowing orbs.. like a light that glows..
here is a code . im making this out of the top of my head so dont know if they will work or not

NPC Code:

timeout=.15;
if (timeout) {
check();
dontblock;
drawaslight;
setcoloreffect .8,.8,.8,this.glow*.1;
}
function check() {
if (this.glow<9&&this.goback=0) { this.glow++; }
if (this.glow>0&&this.goback=1) { this.glow--; }
if (this.glow=0&&this.goback=1) { this.goback=0; }
if (this.glow=9&&this.goback=0) { this.goback=1; }
}



or you can do a random one...

NPC Code:

timeout=.15;
if (timeout) {
this.glow=random(0,10);
dontblock;
drawaslight;
setcoloreffect .8,.8,.8,this.glow*.1;
}



or one that keeps going shinier..

NPC Code:

timeout=.15;
if (timeout) {
this.glow=(this.glow+1)%.9;
dontblock;
drawaslight;
setcoloreffect .8,.8,.8,this.glow;
}



or one that goes from shiny to non shiny...

NPC Code:

timeout=.15;
if (timeout) {
this.glow=(this.glow+.9)%1;
dontblock;
drawaslight;
setcoloreffect .8,.8,.8,this.glow;
}



or one that blinks

NPC Code:

timeout=.15;
if (timeout) {
if (this.glow=.9) { this.glow=0; }
else { this.glow=.9; }
dontblock;
drawaslight;
setcoloreffect .8,.8,.8,this.glow;
}

Once again you take it the hard way -_-
Reply With Quote