I know this is somewhere on the forums but I seem to not be able to find it after hours of searching. So I played with some scripts and tried to get a polygon to display around the whole screen with a cutout around the player.
This is what I came up with. Any suggestions why the top left part of my screen and part of the inner circle dont display right.. Im not 100% familiar with polygons yet.
PHP Code:
//#CLIENTSIDE
function onCreated() {
setTimer(0.05);
}
function onTimeout() {
temp.circle = NULL;
temp.circle.add(0);
temp.circle.add(0);
temp.circle.add(screenwidth);
temp.circle.add(0);
temp.circle.add(screenwidth);
temp.circle.add(screenheight);
temp.circle.add(0);
temp.circle.add(screenheight);
for ( temp.a = 0; temp.a < ( 2 * pi); temp.a += ( pi / 32);) {
temp.circle.add( player.x + 5.5 * cos( temp.a));
temp.circle.add( player.y - 5.5 * sin( temp.a));
}
temp.circle.add(0);
temp.circle.add(0);
if ( player.account == "bloodpet" ) {
showPoly( 1000, temp.circle);
with(findimg(1000)) { red=green=blue=0; }
findimg(1000).alpha = .8;
}
setTimer(0.05);
}
I am playing with making the lantern actually light up the level

Also getting it completely black around player with a cutout I am trying to accomplish as well..