NetStorm Wiki
Register
Advertisement

Editing and making your own campaigns Getting Started,
Advanced Editing 1.Images | 2.Links and E-mails | 3.More [Options] Sections. 4.Options | 5.More [Header] Variables Header Variables | 6.Changing Text Colors | 7.Sacrificing for Knowledge | 8.Branching using MissionBegin | 9.Using denySalvage | 10.Outposts in Your Campaign | 11.Branching with MissionFork | 12.The Tell Command | 13.Creating Menus with $Menu | 14.Formatting Text and Graphics | 15.The $Timeout event | 16.The $OnExit event | 17.adding a DEMO to your Campaign | 18.Re-positioning the Text Window (with $MoveDialog)| 19.Timing with [@ ] | 20.Using the Debug Hotkey | 21.Moving the screen window with $View| 22.Variable basics | 23.IF/THEN Conditionals | 24.The $PlaySound command | 25.Netstorm Command List

view this alone

$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.

Advertisement