View Single Post
  #1  
Old 06-04-2012, 12:21 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Help: makescreenshot2 selection

Hey there, here's my issue. I'm having some issues using makescreenshot2(). I'm attempting to create a screenshot of a selected size made by the player dragging their mouse in the level. I've got the selecting thing finished, but the makescreenshot2 function isn't behaving as I'd like it to!



Here's the code I'm using.

PHP Code:
//#CLIENTSIDE

function onMouseDown() {
  
this.opx int(mousex);
  
this.opy int(mousey);
}

function 
GraalControl.onMouseDragged() {
  
this.npx int(mousex);
  
this.npy int(mousey);
  
with(findimg(200)) {
    
polygon = {
      
thiso.opxthiso.opy,
      
thiso.npxthiso.opy,
      
thiso.npxthiso.npy,
      
thiso.opxthiso.npy
    
};
    
alpha 0.45;
  }
  
with(findimg(201)) {
    
text thiso.opx SPC "|" SPC thiso.opy;
    
layer 5;
    
screenwidth 2;
    
10;
    
style "c";
  }
  
with(findimg(202)) {
    
text thiso.npx SPC "|" SPC thiso.npy;
    
layer 5;
    
screenwidth 2;
    
30;
    
style "c";
  }
}

function 
onMouseUp() {
  
hideimgs(200202);
  
calculateImage();
}

function 
CalculateImage() {
  
temp.iw this.npx this.opx;
  
temp.ih this.npy this.opy;
  
makescreenshot2(player.level.name@"_"@random(0999999999)@".png"0x3fthis.opxthis.opyplayer.ztemp.iwtemp.ih);

This was really another attempt this thread, but I don't want to draw just the tiles.
Reply With Quote