Something like this:

Code:
randomize();

PANEL *panels[10];

var i;
for( i=0; i<10; i++ ) {
  
  PANEL *newPanel = pan_create("bmap=mysprite.tga; flags=VISIBLE;", i); //set on layer i
  newPanel->pos_x = random(screen_size.x-newPanel->size_x);
  newPanel->pos_y = random(screen_size.y-newPanel->size_y);
  

  //Now store the panel in our array,
  //so as not to lose track of the pointer (and create a memory leak).
  panels[i] = newPanel;
}




Click and join the 3dgs irc community!
Room: #3dgs