Ok so I need to call specific items within an array using a random variable.
#This is my array:
$game_variables[1] = ["one", "two", "three", "four"]
#this is the call for one of the items above in the array
$game_variables[2] = $game_variables[1][rand[3]]
Except this doesn't work. I also tried:
$game_variables[3] = rand[3]
$game_variables[2] = $game_variables[1][$game_variables[3]]
Which doesn't work either.
So what am I doing wrong here? What RGSS3 'code' am I not aware of that needs to be in there, or is this even possible?
#This is my array:
$game_variables[1] = ["one", "two", "three", "four"]
#this is the call for one of the items above in the array
$game_variables[2] = $game_variables[1][rand[3]]
Except this doesn't work. I also tried:
$game_variables[3] = rand[3]
$game_variables[2] = $game_variables[1][$game_variables[3]]
Which doesn't work either.
So what am I doing wrong here? What RGSS3 'code' am I not aware of that needs to be in there, or is this even possible?