Computer Science Canada Help in making a triangle... |
Author: | 1337 [ Tue Jun 01, 2004 8:50 pm ] |
Post subject: | Help in making a triangle... |
I know you have to use lines for the triangle, but I tried alot of different numbers and can't figure it out. Basically, I want it to look like this: |_ | _ | - |- Well I'm not a good drawer but the 2 vertices pointing left. They should include the x and y coordinates as it's controlled when I'm making my shooting game. Thanks, |
Author: | Paul [ Tue Jun 01, 2004 8:53 pm ] |
Post subject: | |
huh? Your picture didn't exactly look like a triangle, do you mean just a triangle with one of it's point pointing directly right? |
Author: | 1337 [ Tue Jun 01, 2004 8:55 pm ] |
Post subject: | |
Yeah, sorry, I suck at drawing :\ | _ | _ | _ | |
Author: | Paul [ Tue Jun 01, 2004 8:57 pm ] | ||
Post subject: | |||
huh wha? anyway tell me if this is close
so it draws a triangle with vertices (100,100) , (100, 300), (300, 200) |
Author: | Tony [ Tue Jun 01, 2004 8:58 pm ] | ||
Post subject: | |||
delta's Pic~2~Code is always useful... otherwise
|
Author: | SuperGenius [ Tue Jun 01, 2004 8:59 pm ] | ||
Post subject: | |||
to make a triange you need 3 seperate drawline statements. each x and y pair of coords will have to be used twice... so:
both of these groups of 3 drawline statements do the same thing. |
Author: | SuperGenius [ Tue Jun 01, 2004 9:00 pm ] |
Post subject: | |
oops, it seems I have been beaten to the answer... ![]() |
Author: | 1337 [ Tue Jun 01, 2004 9:01 pm ] |
Post subject: | |
Well, I'm making a game and the x y coordinates should be controlled by my down and up arrow. Can you post how it should look like before Input.KeyDown (chars), etc. BTW: x := 10 y := 25 And also, can you make it smaller? Like 1/4th its size. thanks again |
Author: | Tony [ Tue Jun 01, 2004 9:04 pm ] |
Post subject: | |
wow ![]() |
Author: | Paul [ Tue Jun 01, 2004 9:14 pm ] |
Post subject: | |
1337 wrote: Well, I'm making a game and the x y coordinates should be controlled by my down and up arrow.
Can you post how it should look like before Input.KeyDown (chars), etc. BTW: x := 10 y := 25 And also, can you make it smaller? Like 1/4th its size. thanks again well what u can do is make one set of values variables, then make all other values dependent on your one set, that way when one changes, all will change. |
Author: | 1337 [ Wed Jun 02, 2004 5:59 pm ] |
Post subject: | |
var x, y, b : int loop View.Update cls Mouse.Where (x, y, b) Draw.Line (x, y, x + 50, y + 50, 78) Draw.Line (x + 50, y + 50, x, y + 100, 78) Draw.Line (x, y + 100, x, y, 78) end loop Okay, I got that, but now I want to know how to make it so that out of the triangle, red dots start shooting, while it moves with the mouse. Do you use drawline or drawdot, can you show a good example? After that, I want to know how to make ovals in random places through the screen. After that, I'll try to do collision and things, if I need more help I'll ask again ![]() Thanks again. |
Author: | Cervantes [ Wed Jun 02, 2004 7:59 pm ] | ||
Post subject: | |||
1337 wrote: Do you use drawline or drawdot
1337 wrote: red dots start shooting
drawdot ![]() though if you want the dots to stay on the screen, you could use either. also, if you want the dots to be larger then 1x1 pixels, use drawfilloval. as for how: if you're shooting out 1 dot then
I'm not sure how you want the red dots to shoot out though. maybe you want one to shoot from each side and to go with slopes of 1 and negative 1. ![]() |
Author: | 1337 [ Thu Jun 03, 2004 10:51 pm ] | ||
Post subject: | |||
I tried collision when it reaches maxx, but it doesn't seem to work. Any help?
|
Author: | .hack [ Sun Jun 06, 2004 4:58 pm ] |
Post subject: | |
if ur making a triangle..go into paint, draw ur triangle,m save it and import it thru GUI? Its not very hard to do, just check out the manual in Turing, Help > "Turing Reference" I believe. Its a basic command..I jsut forget what it is lo Pic.FileNew App5:("C:\TriangleOF133.JPG) or something to taht effect. |
Author: | 1337 [ Sat Jun 12, 2004 9:25 pm ] |
Post subject: | |
Also, I was wondering how you can use Mouse.Where and drawlines so that you can picture a bullet. Like: > = ship > . . . . (and the rest behind goes out) Kinda like this guys: http://www.compsci.ca/v2/viewtopic.php?t=1340 Thanks again! |