![]() |
Showpoly Explain
I really want to lean towards using images and shapes in my scripts. I thought a good place to start was showpoly. I searched the graal wiki and I didn't find anything that can help me. Maybe you guys can?
|
There's not a lot to it:
PHP Code:
You can use as many points as you want. I think you need at least 3 sets of x,y points though. Used to be able to draw lines with just two but i believe that changed with V5. Other Reading: http://gscript.graal.net/showpoly |
Quote:
|
Takes some fiddling to get the shape you want.
|
Not really,what you do is you plot the outline of the points you want:
Square example: PHP Code:
http://i.imgur.com/wspPW.png Another example would be drawing a circle: PHP Code:
|
So it is
PHP Code:
|
Quote:
|
Quote:
v5 and v6 works just fine using 2 x/y coords. |
You need {}. It's an array.
showpoly(index, {x1,y1,x2,y2,...,xn,yn}); That's why Tricxta used temp.square to list the points first. You forgot the index, too. |
Polygons also support RGBA coloring, which is nice I guess.
PHP Code:
|
You should be able too.... just use findimg(index).
|
| All times are GMT +2. The time now is 02:43 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.