Page 1 of 1

lineto(x,y)

PostPosted: Sun Jun 20, 2004 1:33 am
by Just4Fun
Is the lineto script function working properly in GE1.2?

If so, would someone be kind enough to explain how the coordinate system works with lineto?

I can't seem to get a simple rectangle drawn with coordinates that make sense to me.


For example:

CreateActor-->
setpen(0,0,255,0,2);//blue
lineto(0,300); //vertical line drawn down left side of screen
Why not drawn horizontally across the top?

DrawActor-->
lineto(200,300);//horizontal line across bottom
Huh??

DrawActor-->
lineto(200,0); //vertical line on right side of screen
Why not drawn horizontally across the bottom?

DrawActor-->

HELP!! I can't get the horizontal line across the top!! And the above code took me forever to do by tinkering around with the numbers, but I still don't really understand. I've done the screen coordinate & setpen tutorials and I've also read the script help, but I am still missing the coordinate concept... or something. Sorry to be so dense. The coordinates are still confusing me. :oops:

TIA

PostPosted: Sun Jun 20, 2004 1:27 pm
by makslane
Before use a lineto, use a moveto (to move your pen to a specified position)

See the tutorial:
Help -> Script -> Drawing Functions

For a complete explanation

PostPosted: Mon Jun 21, 2004 6:36 pm
by Just4Fun
Thanks Makslane,
I got it !!!!
:lol: