Computer Science Canada Shooting |
Author: | Guy [ Mon May 16, 2005 11:27 am ] |
Post subject: | Shooting |
I need to find out how to shoot with a character (red) in my game...... var x, x2, y, y2 : int := 200 loop colorback (black) cls setscreen ("graphics: vga") drawfillbox (50, 110, 40, 280, white) drawfillbox (590, 110, 600, 280, white) drawfillbox (490, 0, 500, 25, white) drawfillbox (490, 375, 500, maxy, white) drawfillbox (125, 375, 135, maxy, white) drawfillbox (125, 0, 135, 25, white) drawfilloval (320, 190, 50, 50, white) drawfilloval (450, 200, 5, 5, blue) drawfilloval (x, y, 5, 5, red) var input : char := getchar if input = KEY_UP_ARROW then y := y + 5 elsif input = KEY_DOWN_ARROW then y := y - 5 elsif input = KEY_LEFT_ARROW then x := x - 5 elsif input = KEY_RIGHT_ARROW then x := x + 5 end if end loop |
Author: | jamonathin [ Mon May 16, 2005 1:29 pm ] | ||
Post subject: | |||
elaborate more on what you want to shoot / where you want to shoot / how many times. For all I know you want him to shoot turds at the white bars. I cleaned your program up a touch, it was aggrivating me.
Also check tutorials for shooting, or use the search engine at the top. |
Author: | MysticVegeta [ Mon May 16, 2005 3:37 pm ] | ||
Post subject: | |||
You mean something like that? If you want to make it something like after you shoot, immediately you can move without waiting for the bullet to get at the end then i would suggest you learn "procedures" and "forward"ing them |
Author: | jamonathin [ Tue May 17, 2005 5:49 am ] | ||
Post subject: | |||
Thats actually a bad method for shooting. Just check for where the bullet is constantly, and if the bullet is less than your target, then have it keep moving, like this.
|
Author: | Guy [ Wed May 18, 2005 11:20 am ] |
Post subject: | THANKS |
Thanks for da help |