----------------------------------- MOUSECORD Tue Jun 08, 2004 4:30 pm Missile Help in Missile Command ----------------------------------- I am making Missile Command i have most things completed except the core of the game (the missiles) that drop from the sky... i just can't figure out a way to program the missiles to fall... or anything ... i need some insight on how to make lines drop gradually from the top if someone could help it will be greatly appreciated... Thanks ----------------------------------- Paul Tue Jun 08, 2004 4:35 pm ----------------------------------- this should be in "turing help" not "turing submissions", here is where u submit your programs. ----------------------------------- Tony Tue Jun 08, 2004 5:11 pm ----------------------------------- drop as in View.Set ("offscreenonly") var y : int := maxy loop exit when y < 0 y -= 5 Draw.FillOval (100, y, 5, 5, red) View.Update cls end loop ? :think: ----------------------------------- MOUSECORD Tue Jun 08, 2004 5:16 pm not sure ----------------------------------- yeah i guess that kinda works i didn't think to use a oval i was thinking of using drawline hmmm Ahhh its confusing believe me lol i'm sucha noob to this i guess but i was attempting to make them gradually go down u kno? that is like a spec and i attempted to put a delay.... and it didn't seem to work ya kno not sure ----------------------------------- Tony Tue Jun 08, 2004 5:19 pm ----------------------------------- you might want to get a hold of [url=http://www.compsci.ca/v2/viewtopic.php?t=4381]valor ----------------------------------- aside Tue Jun 08, 2004 6:16 pm ----------------------------------- replace the drawfilloval with the procedure you use to draw your graphics, then use delay() to make the program run slower. ----------------------------------- greenapplesodaex Tue Jun 08, 2004 7:19 pm reply ----------------------------------- check out my missile game http://www.compsci.ca/v2/viewtopic.php?p=51076#51076 ----------------------------------- MOUSECORD Tue Jun 08, 2004 8:17 pm sweet ----------------------------------- k yeah i got that like... draw.filloval stuff going down like straight down thx for the good start its going good now i think now... i never thought of using ovals... i thought of using lines... i'm not sure if u could use lines also... anyone know if u could use lines too... hmmm quite complecated mb its easier then i think it is... i'm over thinking it i think.... i made it like this.... : View.Set ("offscreenonly:640;400") var y : int := maxy var y1 : int := 21 loop %exit when y < 0 if y 0 end loop end loop Okay so when u run it u don't see anything i can't get it to show the missile falling can neone see why is there a tweek i need to do...??? ----------------------------------- aside Tue Jun 08, 2004 9:06 pm ----------------------------------- you used cls right after you draw the line, so it is erased before it is shown. move the cls before the drawline ----------------------------------- MOUSECORD Tue Jun 08, 2004 9:08 pm hmm ----------------------------------- now it just shows the line where its desination will be it doesn't show it going to it... hmmmm ----------------------------------- aside Tue Jun 08, 2004 9:11 pm ----------------------------------- well, your variables (x and y) are not changing, so of course it will be the same line forever. change the variables. ----------------------------------- MOUSECORD Tue Jun 08, 2004 9:13 pm yeah ----------------------------------- yeah but see i'm making x1 and y1 being at a fixed state at the top of the screen and then x2 and y2 are - 1 so that those two points move down the screen u see??? does that make any sense?/? ----------------------------------- aside Tue Jun 08, 2004 9:16 pm ----------------------------------- yes, you made the x2 and y2 -1 when you are using it, but you are not changing the basic value of them. if x2 is originally 6, then you will have an x value of x2-1=6-1=5 always, use x2:=x2-2 or x2-=2 to actually change the value stored inside the variable ----------------------------------- MOUSECORD Tue Jun 08, 2004 9:28 pm ----------------------------------- alright thanks man its workin prety good... check it View.Set ("offscreenonly:640;400") var x1, y1 : int var x2 : int var y2 : int loop randomize randint (x1, 0, 640) randint (y1, 400, 500) randint (x2, 0, 640) y2 := 0 loop cls drawline (x1, y1, x2, y2, 4) x2-=5 y2-=5 delay (100) exit when y2 > 0 end loop end loop now see if u run it... (if you can) ... umm its kinda going wrong way lol i can't figure out why do u see??? hmmm ----------------------------------- MOUSECORD Tue Jun 08, 2004 9:44 pm nm ----------------------------------- nvm thx for the help i got it under control dude,.. i gave ya 10 of my 13 bits... thx Lol!!! :D