I noticed quite a few people have been asking around on how to draw a circle with script so Ive made a script that shows how to draw a circle using the showpoly statement.
// NPC made by tricxta
if (playerenters){
this.index=1000;//starting index
this.section=100;//you can keep this or remove it, it just lets you draw to a certain point in the circle say if you put it at 50 you will see the difference
this.r=2;//your basic radius
for (this.A=0;this.A<(6.3/100*this.section);this.A+=0.05;){//your basic for next loop to move onto the next radian
this.index+=1;//increment the index by 1 so your not rewriting the image
x1=30 + this.r*cos(this.A);//caclulating points in the circle
y1=30 + this.r*sin(this.A);
x2=30 + this.r*cos(this.A+.5);
y2=30 + this.r*sin(this.A+.5);
showpoly this.index,{30,30,x1,y1,x2,y2};//drawing one section of the circle
sleep .05;
}
}
Ive posted this here as a reference since I could see no good examples of using a showpoly to draw a circle