Re: bgt three questions
That code is mostly good.
There are only two major problems:
1. The enemy is declared inside the loop, so it is created and destroyed every iteration. Just move the line
enemy enem;
Above the line that says while(true)
2. There's no way to leave the game after it starts. Maybe add something so that if the user presses key_escape, play_round returns?
A smaller issue: inside the loop of play_round, you probably want a call to wait(). It isn't necessary, but without it, the game will quickly use up the CPU resources. Just put something like wait(5); somewhere inside the loop.
About attacking: It depends on things like the range, fire speed, and damage that you want. A gun works differently from a knife, and you might even want a more complicated damage system. Can you say more about what you need for the attack?
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector