Thread: array.random()
View Single Post
  #4  
Old 03-18-2011, 04:07 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Quote:
Originally Posted by fowlplay4 View Post
Wouldn't mind seeing something like this:

PHP Code:
function onCreated() {
  
temp.arr = {
    
12345
  
};
  
temp.element temp.arr.random();
  echo(
temp.element); // Echos 1, 2, 3, 4, or 5

Same thing as doing...

PHP Code:
function onCreated() {
  
temp.arr = {
    
12345
  
};
  
temp.element arr[int(random(0arr.size()))];
  echo(
temp.element);

Yeah, that would be neat and useful
__________________
Quote:
Originally Posted by Satoru Iwata
On the other hand, free-to-play games, if unbalanced, could result in some consumers paying extremely large amounts of money, and we can certainly not expect to build a good relationship with our consumers in this fashion. In order to have a favorable long-term relationship, we would like to offer free-to-play games that are balanced and reasonable.
Quote:
Originally Posted by Unximad
Eurocenter Games remains attached to the values of indies game developer and to the service our playerbase community.
Reply With Quote