you cannot creat an array of strings neither can you put something like
bmap = strCoord[ i ]; into a panel definition.
insead define the panel without a bmap, if this isnt possible either replace it with the first panel of yours.
then write a function which does this random stuff and gives the coord00 panel the right bmap:
Code:
string file_name = "img";
string file_type = ".pcx";
string file;
string file_number;
function set_panels
{
var i;
i = int(random(3))+1;
str_cpy(file,file_name);
str_for_num(file_number,i);
str_cat(file,file_number);
str_cat(file,file_type);
coord00.bmap = file;
}
//another way to have a high number of panels and assign them all a random bmap:
var max_panels = 10;
var panel_handle[10]; //array to store the panel pointers
coord00 { ... }
coord01 { ... }
//and so on
panel* coord_ptr;
string file_name = "img";
string file_type = ".pcx";
string file;
string file_number;
function set_panels
{
panel_handle[0] = handle(coord00);
panel_handle[1] = handle(coord01);
//and so on
var i;
var a = 0;
while(a < max_panels)
{
i = int(random(3))+1;
str_cpy(file,file_name);
str_for_num(file_number,i);
str_cat(file,file_number);
str_cat(file,file_type);
coord_ptr = ptr_for_handle(panel_handle[a];
coord_ptr.bmap = file;
a += 1;
wait(1);
}
}
well i guess this is a pretty komplex way. You should
check out the pan_create instruction. That would be the easy way.