
-----------------------------------
crimsonXess
Sun Oct 19, 2008 12:50 pm

Is there a Line.Draw that i can use wiht a return value?
-----------------------------------
I'm trying to make a guitar hero type game and for it i need a line that can give me a return value so when i use

if Key_pressed= "j" and line = (oval)% when the person hits the key when the oval is on the line then give the person a point 
 then 
point:=point +1
end if

but the problem is i cant do that because i cant assign a variable to the line :P, help please
 or if  you got another way to do this please explain fully


***I'm a noob at this and just started this a while ago , please help if you can and give full explanation*****

-----------------------------------
Insectoid
Sun Oct 19, 2008 12:54 pm

RE:Is there a Line.Draw that i can use wiht a return value?
-----------------------------------
Check the Y value of the oval to see if it is equal to the Y value of the line. Of course, this would make it very difficult, so I would suggest checking if the Y is within a certain distance, say, 5 pixels, of the line.

-----------------------------------
crimsonXess
Sun Oct 19, 2008 5:08 pm

Re: Is there a Line.Draw that i can use wiht a return value?
-----------------------------------
how would i do that?

-----------------------------------
Tony
Sun Oct 19, 2008 5:19 pm

RE:Is there a Line.Draw that i can use wiht a return value?
-----------------------------------
Sketch this out on paper, and figure out the math from there.

A line has a certain Y value, for the height at which it is drawn.

A circle has a certain Y value, for the position of it's center, at a given frame. The said circle also has a radius.

How would you describe a condition where you are certain that the line is inside the circle?
