Skip navigation
LukeElChul
Currently Being Moderated

Random Array?

Apr 8, 2012 12:46 PM

Tags: #help #flash #frame #dynamic #as2 #actionscript #movieclip #game #movie #2.0 #objects #movie_clip #dinamyc

Im making a random drop item system.

 

I was thinking of making a array like this:

 

var Items:Array = ["HP","ST","SWORD"]

 

then...

 

if(Items == SWORD){

//drop sword

//do code here

}

 

but i have no idea of how to access and use 1 value from an array.

 

I think i need to use something like math.floor or math.random but i dont know how to go foward with this.

 

 

Thanks in advance.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points