Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:55 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.