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?