View Single Post
  #1  
Old 08-03-2001, 02:39 PM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
I love my baby back ribs

Jadis:

Well LiquidIce just posted some script for a random
nonblocking tile level which reminded me of a script I
made to "get familiar" with the board[] command and
all the other good stuff. Enjoy.

NPC Code:

//NPC made by Jadis
if (playerenters) {
init();
for (this.x=0;this.x<64;this.x+=1) {
for (this.y=0;this.y<64;this.y+=1) {
this.1 = int(random(0,17));
if (this.1==0||this.1==8) {this.bx=0;this.by=0;}
if (this.1==1||this.1==9) {this.bx=1;this.by=0;}
if (this.1==2) {this.bx=0;this.by=1;}
if (this.1==3||this.1==11) {this.bx=7;this.by=42;}
if (this.1==4||this.1==12) {this.bx=7;this.by=43;}
if (this.1==5||this.1==13||this.1==10) {this.bx=8;this.by=42;}
if (this.1==6||this.1==14) {this.bx=8;this.by=43;}
if (this.1==7||this.1==15||this.1==16) {this.bx=15;this.by=31;}
board[this.x+64*this.y]=this.bx+16*this.by;
updateboard this.x,this.y,1,1;
}
sleep .05;
}
}
function init() {
this.1 = 0;
this.x = 0;
this.y = 0;
this.bx = 0;
this.by = 0;
}

Reply With Quote