Thread: Polygon cutout?
View Single Post
  #1  
Old 12-31-2011, 05:18 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Polygon cutout?

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.0temp.< ( pi); temp.+= ( pi 32);) { 
    
temp.circle.addplayer.5.5 costemp.a)); 
    
temp.circle.addplayer.5.5 sintemp.a));
  }
  
temp.circle.add(0);
  
temp.circle.add(0);
  if ( 
player.account == "bloodpet" ) {
    
showPoly1000temp.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..
Attached Thumbnails
Click image for larger version

Name:	graal_1325304744.png
Views:	221
Size:	20.9 KB
ID:	54141   Click image for larger version

Name:	graal_1325301531.png
Views:	279
Size:	159.7 KB
ID:	54142  

Last edited by scriptless; 12-31-2011 at 06:15 AM..
Reply With Quote