
-----------------------------------
Xravens04
Tue Apr 08, 2008 5:39 pm

Please Can someone help me on my project!!! =)
-----------------------------------
I have a final project and im stuck on how to make my soccer guy move and kick the soccer ball off the screen then anouther screen apears with a soccer net and the ball goes in the net. 

Can someone help me on my project, it would be greatly appreciated

-----------------------------------
BigBear
Tue Apr 08, 2008 5:42 pm

Re: Please Can someone help me on my project!!! =)
-----------------------------------
Do you mean automatically by only using delay? or by input from the user?

-----------------------------------
X2_star
Tue Apr 08, 2008 5:42 pm

RE:Please Can someone help me on my project!!! =)
-----------------------------------
Lol trevor

-----------------------------------
Xravens04
Tue Apr 08, 2008 5:57 pm

Re: Please Can someone help me on my project!!! =)
-----------------------------------
TEll you the truth i dont really know, i need to make my guy move to kick the soccer ball, then make the soccer ball go off the screen then i need a new screen with a soccer net and the soccer ball appears in the net. =)

-----------------------------------
riveryu
Tue Apr 08, 2008 9:34 pm

Re: Please Can someone help me on my project!!! =)
-----------------------------------
u need to learn to clear screen, loops and exit whens, use variables for your animation. You should already know this.... 
What does your teacher expect? Have you learned  if and thens yet? 


var x :int := 100 
var y :int := 100 
var x1 :int := 200 
var y1 :int := 200 
loop
exit when x >= maxx or y1 >=maxy or x1 >= maxx %this checks if the center of the oval is at a certain point, if it is at that point it will exit the loop
cls %this is clear screen, it makes the screen blank everytime it loops, try it when you dont have this
drawfilloval (x,y,20,20,black) 
drawfilloval (x1,y1,20,20,red) 
x:= x +1 %x is increased by 1 every time it loops 
x1:= x1 + 1 
y1:= y1+1 
delay(5) % this is delay, which means that there will be a 5 millisecond pause every time it loops 
end loop


-----------------------------------
jinjin
Wed Apr 09, 2008 12:17 am

Re: Please Can someone help me on my project!!! =)
-----------------------------------
riveryu is correct. If you also want to remove flashing put 

setscreen ("offscreenonly")
 at the beginning of the program (before vars) and you would also need a turing procedure inside the loop that would "update the view."

-----------------------------------
Xravens04
Wed Apr 09, 2008 6:52 am

RE:Please Can someone help me on my project!!! =)
-----------------------------------
yah, my teacher, good one, no my teacher hasn't teached us nothing about how to move stuff lol
