PDA

View Full Version : Pure chaos!


grim_squeaker_x
04-25-2001, 01:21 AM
Yay, I've just made an NPC for making a level pure and utter chaos! And yes I realize that it has probably been done before and that anyone who knows how the board array stuff works could script it. But it's still fun ^^
//NPC Made by Grim Squeaker
//If you give x1 or y1 a higher value then
//x2 or y2 nothing will happen at all.
if (created) {
this.x1=0; //Leftmost part of chaos
this.x2=64;//Rightmost part of chaos
this.y1=0; //Highest part of chaos
this.y2=64;//Lowest part of chaos
}
if (playerenters||timeout) {
if (isleader) {
for (this.i=this.x1;this.i<this.x2;this.i++) for (this.j=this.y1;this.j<this.y2;this.j++) {
if (this.grassonly==0) {
this.a = int(random(0,15));
this.b = int(random(0,255));
board[this.i+64*this.j] = this.a+this.b*16;
}
}
updateboard this.x1,this.y1,this.x2-this.x1,this.y2-this.y1;
}
timeout=0.05;
timereverywhere;
}

GexGecko
05-02-2001, 08:33 AM
RESCUE WORKERS SAVE ME!!

milotheman
05-02-2001, 08:38 AM
that was awsome

GexGecko
05-02-2001, 08:40 AM
OOPS! Here ya go!