Thread: Arrays...?
View Single Post
  #3  
Old 10-13-2001, 09:36 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Arrays...?

Quote:
Originally posted by Shard_IceFire
Hi!
I am a pretty good scripter, but one thing that I just skipped over when I was learning was arrays. I was wondering, exactly how do you use them? And what can they be used for?
Thanks.
well a basic array would be like
NPC Code:

if(created){
this.x={1,30,50,25};
this.y={5,20,18,30};
}
if(playertouchsme){
this.rnd=int(random(0,4));
x=this.x[this.rnd];
y=this.y[this.rnd];
}

__________________
Thanks,
-KJL
Reply With Quote