I got a guy to shoot<attachment> but now i need to know how to let the guy shoot but move around while it is shot.
Code:
//shoot
#include <iostream.h>
#include <conio.h>
#include <dos.h>
int main(void)
{
clrscr();
cout<<"this guy will now shoot.Press space to shoot."<<endl;
getch();
clrscr();
int x = 10;
int y = 10;
int a = 11;
int b = 10;
int f = 0;
gotoxy(x, y);
cprintf("e");
char e = getch();
if (e==32)
{
while(f!=8)
{
clrscr();
gotoxy(x, y);
cprintf("e");
gotoxy(a, b);
cprintf(">");
a = a + 4;
f = f + 1;
delay(500);
}
}
return 0;
}
thats the code if it will help