Problem getting screenshot

Started by OllyRich, Mon 30/05/2005 16:42:26

Previous topic - Next topic

OllyRich

Hello,

The following code should save a game position then load the
corresponding screenshot to the button  "currentPic" in the save dialog
"gMysaveguia". The problem is that it always load the previous saved screenshot
and not the current one. Does anybody have any ideas?
if (keycode==363){
   
     theSlot=150;
     
      SaveGameSlot(theSlot, "preview");
      Wait(200);
     
      buttonSprite3 = DynamicSprite.CreateFromSaveGame(150,80, 55);
      currentPic.NormalGraphic =  buttonSprite3.Graphic;
     
    showButtonImages();   //Vorbereitungsphase
    SetMouseCursor (6);
 
   gMysaveguia.Visible = true;
      

  }

Thanks

strazer

SaveGameSlot is a delayed-response function, meaning it gets executed when the script finishes, so it is actually executed after you create the dynamic sprite.

You could use DynamicSprite.CreateFromScreenShot instead.

SMF spam blocked by CleanTalk