View Single Post
Old 13th January 2004, 06:24   #15
Braininator
Junior Member
 
Join Date: Jan 2004
Location: Australia
Posts: 12
Thanks for the help.

EDIT: S-uper_T-oast, your code has a few mistakes in it, but I got the general idea. Thanks.

EDIT 2: Still having trouble. I'm trying to get a line from the center of the screen to the top-right corner, but I keep getting a line from the center straight down. My code:
In Init
code:

Xloc1=0; //sets the X coordinate of our first point
Yloc1=1; //sets the Y coordinate of our first point
Xloc2=0; //sets the X coordinate of our second point
Yloc2=1; //sets the Y coordinate of our second point


In Frame
code:

p=0; //reset perpoint counter to 0


In Perpoint
code:

p=p+1; //adds one to out perpoint counter for every point being drawn
x=equal(p,1)*Xloc1+equal(p,2)*Xloc2; //When P equals 1, sets the X coordinate to our Xloc1, and when P equals 2, sets our X coordinate to our Xloc2
y=equal(p,1)*Yloc1+equal(p,2)*Yloc2; //When P equals 1, set our Y coordinate to our Yloc1, and when P equals 2, sets our Y coordinate to our Yloc2


Last edited by Braininator; 13th January 2004 at 06:51.
Braininator is offline   Reply With Quote