Quote:
Originally posted by grim_squeaker_x
NPC Code:
if (playerenters||timeout) {
for (this.i=0;this.i<64;this.i++) for (this.j=0;this.j<64;this.j++) {
this.a=int(random(0,16));
this.b=int(random(0,255));
board[this.i+64*this.j]=this.a+16*this.b;
}
updateboard 0,0,64,64;
timeout=0.05;
}
Put that in a level and then you've got even more chaos.
|
I'd change it from iterating through the x and y to iterating simply from 0 to 4095. Like so:
NPC Code:
for(j=0;j!=4096;j++){
board[j]=int(random(4080));
}
updateboard 0,0,64,64;
timeout=0.05
Only
slightly shorter
[edit]Stupid UBB code! Had to change my i to a j![/edit]