if Mx <= targetx + 50and Mx >= targetx - 50and My <= targety + 50and My >= targety - 50and button2 =1then%if the cc hit the target, score+1
score +=1
bullets -=1 elsif button2 =1then
bullets -=1 exitwhen bullets <= 0 endif exitwhen bullets <= 0 endloop put"Your final score is: ", score
this is what i can do right now, im sure u what you mean is different from me. giving an example of code would really help. thx
Sponsor Sponsor
Tony
Posted: Fri Jan 14, 2011 1:08 pm Post subject: Re: mousewhere in a target shooting game
nightfeng2 @ Fri Jan 14, 2011 9:25 am wrote:
if button = 1 then
button2 := button
This part will guarantees that both button and button2 will always be the same when you exit the loop. Read your if statements out-loud to make sure they make sense to you: "if button is 1 then assign value of button (1) to button2".