if might help if you'd use Input.KeyDown instead... read tutorial... everybody who knows how to use that recomments it over getch...

now, you should make a separate procedure for the bullet that will move it along its trajectory. Then set a flag variable in the main loop so that the procedure keeps on getting called to move the bullet while its on screen. This way it moves bullet 1 spot, then returns to tank controls to allow you to move it as well..

How would i use Input.KeyRight in my code? Can you give me an example please.

Dragoon

Posted: Fri May 23, 2003 6:03 pm Post subject: (No subject)

Okay , i got everything to work except for the Bullet, i made a procedure and now how do i have it so the bullet moves while the tank moves too?

Tony

Posted: Fri May 23, 2003 7:17 pm Post subject: (No subject)

structure it like this:

procedure moveBullet
bulletX += movementX
bulletY += movementY
%maye some other stuff like check if it hit something or what not
%reset bulletFlag back to flase once bullet is done moving
end moveBullet

%main loop
loop
input.ketdown stuff
if chars('f') then
%or whatever button you want to fire with
bulletFlag = true
end if