[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] timing question



Hi all,

I'm writing a little text-based game and I have stumbled upon a strange newbie problem.
In this game, the player has to input a number of commands in order to interact with the game. I am using raw_input to get input from the player.
My problem is that I want to make it turn based, and I want to limit the amount of time players have per turn. And I don't know how to do that. I have tried to create an event and push it to the event list, but it doesn't act until the player provides input, so it is not working.
So the idea is:
player provides specific input (raw_input)
game objects are affected by input
+1 turn
if turns = x:
game over

I am quite sure this is a simple problem, but I have been going around it for a couple of days with no success - help! :)

thanks!

mundial