Hi,
I have created a game called Lego Paintball, and am having a little problem. During the wait stage between game set up and game start, the time in which players can choose to join, i want to ask players if they would like to join. However, i have tried to do this before, and the code i used made the player be asked before the timer started, but the timer wouldnt start counting down until all users had answered. As you can imagine, this would create problems if there was even one single player that had gone AFK (i dont have an AFK status thing on it, but you get the idea).
Can anyone help?
ID:273622
Oct 25 2010, 12:37 am
|
|
Oct 25 2010, 1:05 am
|
|
Try starting the timer before players answer. If they answer after the time is up, just send them a message saying they waited too long in an if statement.
|
As an addendum to what OrangeWeapons said, a trick you can use to automatically cancel an input() is to call input() in a throwaway object that you then delete when you want to stop the input(). An example:
input_timer |
In response to Jp
|
|
That's neat and definitely useful information right there :D
|
In response to Spunky_Girl
|
|
I might have gotten the trick wrong in that code fragment - didn't test it - but basically it relies on any procedures on an object being killed when you delete the object. It's less useful than it sounds - you really shouldn't be using input if you can avoid it.
I don't remember where I got it from - I think there was a library/demo by Falacy(?) that did it, but I might have seen the trick before then. |
In response to Jp
|
|
In response to Schnitzelnagler
|
|
I have read that thread, so my guess is that I've seen that and the library/demo by someone else that implemented it. Good catch.
|
In response to Jp
|
|
Jp wrote:
As an addendum to what OrangeWeapons said, a trick you can use to automatically cancel an input() is to call input() in a throwaway object that you then delete when you want to stop the input(). An example: > input_timer Can i ask how i would incoporate it into this? proc/SetGame() |