Computer Science Canada

need codes for disapearing the man from screen

Author:  progrmmar [ Sun May 16, 2004 12:06 pm ]
Post subject:  need codes for disapearing the man from screen

hi, i am making a shooting game and i am almost done, buti have a one problem. the problem is that 3 or 4 man one time appear on the screen randomly and i wnat to know how can i do this one i shoot one man with my gun how he disapear from the screen. can some one give me the codes or tell me how can i do this. i already put my question on turing help , but no one really help me

Author:  GreenTiger [ Sun May 16, 2004 12:20 pm ]
Post subject: 

Without being too philisophical here;

First, you must tell us what makes them appear on the screen.

Author:  the_short1 [ Sun May 16, 2004 12:28 pm ]
Post subject: 

var mx,my,mbtn : int
loop
mousewhere (mx,my,mbtn)
if mbtn = 1 then
drawfillbox (mx-15,my-15,mx + 25,my + 15,black)
end if
end loop


something like that????


or u can use whatdotcolor ... and to use whatdotcolor look in turing tutorials OR... press f10

Author:  progrmmar [ Mon May 17, 2004 6:31 pm ]
Post subject:  With my gun

yo GreenTiger when i shoote the man with the gunt then i wnat to know how he disapear and how new man appear. cn u give me the example or if u want to tell me plz be more specefic cus i am having very hard time to doing this part, but i cna't figer out it

Author:  SuperGenius [ Mon May 17, 2004 8:49 pm ]
Post subject: 

what you could do is have the program draw pictures of men on the screen, making sure that they are all different colours than the background. Make the program register when the user clicks, and then check the colour at the x,y coords of where they clicked, and if they clicked on the screen and didnt hit the background colour you'll know they hit a man so you can tell the computer to draw a box the same colour as the background over where the man was that you hit, and draw a new man somewhere on the screen.

Author:  progrmmar [ Tue May 18, 2004 2:55 pm ]
Post subject:  can u show me the example

i treid what u told me SuperGenius but it doesn't work. can u show me example plzzzzz that will be helpful

Author:  the_short1 [ Tue May 18, 2004 6:32 pm ]
Post subject: 

we need to see some of ur code to help...

Author:  SuperGenius [ Thu May 20, 2004 4:11 pm ]
Post subject: 

for my suggestion you need a working knowledge of the mouse module as well as whatdotcolour, so look those commands up in the help or the tutorials here if you want.


: