On 06/07/13 13:33, Jack Little wrote:
How would I exit a while statement. The while is to keep the player in combat
with an enemy until said enemy is dead. I tried using an if, but it just
doesn't work.
The devil is in the details, which you do not tell us. How precisely did you use an
"if"?
On 06/07/13 04:33, Jack Little wrote:
How would I exit a while statement. The while is to keep the player in
combat with an enemy until said enemy is dead. I tried using an if, but
it just doesn't work.
In most cases you make the while condition false.
while enemy.state != dead:
# your loop
How would I exit a while statement. The while is to keep the player in combat
with an enemy until said enemy is dead. I tried using an if, but it just
doesn't work.
Jack___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription optio