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 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_1325301531.png
Views:	276
Size:	159.7 KB
ID:	54142   Click image for larger version

Name:	graal_1325304744.png
Views:	220
Size:	20.9 KB
ID:	54141  

Last edited by scriptless; 12-31-2011 at 06:15 AM..
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 07:34 PM.


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