Jump to content

array choose 3 elements and be sure to not choose the same ?


espace
 Share

Recommended Posts

hi,

i have this array :

    this.name_opponent=["Albert","Luc","Gerard","Ros","killthegame","No225","unreal"]


and i use this function to find a opponent. i believe that integerInRange don't choose the same  but it's not the case.

		
for (var i = 0; i < 2; i++) {
this.opponent[i]=game.rnd.integerInRange(0,this.name_opponent.length)
}

wich function do that ? 

thanks 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...