Editing and making your own campaigns Getting Started, |
$Timeout |
No time to waste
Here's an interesting event. This one allows you to wait a certain amount of time before continuing on with a command in the $Timeout line. Kewl! But what good is it? Well, let's check out an example and see.
Say you want to have the player choose if they want to form and alliance with computer player AI2. If they select YES, the game will branch to a new scenario with AI2 as an ally (called ai2buddy). If they select No, then the game continues with AI2 as an enemy. And if they don't select anything, after 8 seconds, the scenario will tell the player that the option of Alliance has been withdrawn. How do you do this you say? Like this:
[Options]
[A.]
Mr Evil, your sworn arch enemy for years, asks for an alliance. Do you agree?<br>
$Button=YES,MissionBegin,ai2buddy
$Button=No,Tell,NoAlliance
$Timeout= 8,Tell,AllianceWithdrawn
[AllianceWithdrawn]
<p>You waited too long. Mr Evil thinks that you're mocking him! He withdraws his
offer of alliance, and warns you to prepare for battle!
$Button=To Battle,DoNothing,0
[NoAlliance]
<p>You reject his offer of alliance. You want to continue to fight Mr Evil!
$Button=To Battle,DoNothing,0
Of course, for this to work, ai2 must be set up as an enemy AI. Remember also, that the number in the $Timeout line is the time that will be waited in seconds.
You don't have to have a Tell command with the $Timeout event. Any of the previously described keywords will work, such as MissionBegin, MissionFork, MissionAbort, MissionRestart, MissionReview, MissionEnd, GetTechnology or ShowTechnology.
Neat, huh? Now the Furies don't have to wait around forever for Netstormonians to make up their mind.