View Single Post
  #5  
Old 07-02-2008, 01:27 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
PHP Code:
showpoly(index, {x1y1x2y2x3y3x4y4etc}); 
I guess I should probably explain that a bit better.

PHP Code:
showpoly(index, {startxstartywidthxwidthyheightxheightystartxstarty}); 
In theory, that would create a perfect rectangle.

So, lets say we want to draw a poly across the upper half of the screen:
PHP Code:
showpoly(200, {00screenwidth0screenwidthscreenheight 320screenheight 32}); 
The first two: 0, 0 are declaring the poly should start at 0, 0 of the screen
Second two: screenwidth, 0 are saying that the next point of the poly should be at the edge of the players horizontal screen, and 0 (at the top of the screen). At this point we have a white line that goes across the very top of the entire screen.
Third two: screenwidth, screenheight / 2 - 32 are declaring that the next drawing point should be at the right edge of the screen at the bottom right of half of the screen. Now we have a triangle, so we'll add
Fourth two: 0, screenheight / 2 - 32 which tells the next line to draw to the far left of the screen, and half way down.

It doesn't require a fifth one because it automatically closes it back up by connecting the last one to the starting point.

There's also a showpoly2() which has a format like this:

PHP Code:
showpoly2(index, {x1y1z1x2y2z2x3y3z3x4y4z4etc}); 
If you want an actual circle around the screen it would probably be easier for you to just use an image and stretch it across the screen.

For example, you could use the image below and possibly do something like:
PHP Code:
with (findimg(200)) {
  
image "example.gif";
  
x0;
  
stretchx screenwidth;
  
stretchy screenheight 32;

Attached Images
 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote