Thread: Arrays...?
View Single Post
  #11  
Old 10-17-2001, 07:11 AM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
Originally posted by btedji


say you have prices for different apples

you could do this:

this.appleprices={30,40,50,50}

then call it like this:

players[0].rupees-=this.appleprices[this.appletype];

which would be far more efficient than
having variables for each apple price and
would be easy to customize if you had at
the beginning of a script
I still don't quite get that....
rupees-=this.appleprices[this.appletype];
does it just choose one of the 'appleprices' numbers at random or something?
__________________

-=Shard IceFire=-
Reply With Quote