This script provides basic countdown timer functionality for windows.
The timer is stored in frames, and decreases by 1 per frame update.
I have also implemented two features to demonstrate how it is used (ie: make this script actually useful)
1. Message windows. Automatically skips the message when time-out
2: Choice window. Automatically selects a time-out choice.
This script uses the control character "\T" (case insensitive) to specify time-out.
It is used in text input as follows
Where n is the number of seconds before time-out (1 second = 60 frames)
In message windows, you just need to include the control character somewhere.
In choice windows, the last choice that contains a time-out control will be selected as the time-out choice. So for example you might have
choice 1 Yes choice 2 No choice 3 \TCan you repeat the question?
If choice 2 was the cancel choice, and you time-out, then choice 3 will be selected.
For the most part you will probably only need to specify the time-out behavior. Simply alias or super that method
def update_timeout super # your code
Edited by Tsukihime, 20 October 2012 - 09:36 PM.