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.opx, thiso.opy,
thiso.npx, thiso.opy,
thiso.npx, thiso.npy,
thiso.opx, thiso.npy
};
alpha = 0.45;
}
with(findimg(201)) {
text = thiso.opx SPC "|" SPC thiso.opy;
layer = 5;
x = screenwidth / 2;
y = 10;
style = "c";
}
with(findimg(202)) {
text = thiso.npx SPC "|" SPC thiso.npy;
layer = 5;
x = screenwidth / 2;
y = 30;
style = "c";
}
}
function onMouseUp() {
hideimgs(200, 202);
calculateImage();
}
function CalculateImage() {
temp.iw = this.npx - this.opx;
temp.ih = this.npy - this.opy;
makescreenshot2(player.level.name@"_"@random(0, 999999999)@".png", 0x3f, this.opx, this.opy, player.z, temp.iw, temp.ih);
}
This was really another attempt
this thread, but I don't want to draw just the tiles.