+ 1
I need Help.
Hey guys. I need some help. I need like a pause command where the "Wait float(0.1)" is, but i cant find anything on the Internet. I tryd time.sleep(0.1) but it didnt work either. Sry for my bad English and thanks for help. :) gametime_Player1 = 0 max_gametime = (10) Player1 = 1 while Player1 == 1: gametime_Player1 = gametime_Player1 + float(0.1) print(gametime_Player1) if gametime_Player1 >= max_gametime: Player1 = 2 Wait float(0.1) if Player1 == 2: print("Player 1 lost the Game!")
3 Answers
+ 5
Looks like this is python. Try using:
import time
...
time.sleep( t )
... where t is number of seconds
https://www.tutorialspoint.com/python/time_sleep.htm
+ 2
In what language?
0
Yes in Python
Thanks for the Help.
while Player1 == 1:
import time
gametime_Player1 = gametime_Player1 + float(0.1)
print(gametime_Player1)
if gametime_Player1 >= max_gametime:
Player1 = 2
time.sleep(0,1)