Original Post
Imagine that you were making a game where you used photographs of about 50 people with 5 photos of each person saved in gif format. In the game, only one person''s photos would be used, but that person would be selected at random.
The obvious way to do this would be to use a massive select-case type statement using 50 different cases, but that is too long for me.
Does anyone know of a way to select a filename by breaking it up into parts.
For example, Bob''s photos are p01q1.gif, p01q2.gif ..... p01q5.gif and Mary''s photos are p02q1.gif.....p02q5.gif
A random number(1-50) is selected and the name of the files used is determined by concatenation:
first photo: filename1 = p + random(50) + q1.gif
second photo: filename2 = p + random(50) + q2.gif
fifth photo: filename3 = p + random(50) + q5.gif
Does anyone know of a way to do this?