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

Branching Options with MissionBegin


Branching 101

Few people realize that there is a way to use the MissionBegin keyword to branch to different games within the same game. Here's how it works:

In all current single player campaigns, the next game in a series is played only after the player WINS the game. Thus, the MissionBegin command is usually only used after the [Succeeded][BadTeamDead] keywords. A typical campaign would go something like this, with nextmission being the name of the next *.english file in the series to play:

[Succeeded][BadTeamDead]
Success, you've killed all the enemies. Yahoo!

<$Config,Done{mission.fileName}=1>
$Button=Next Mission,MissionBegin,nextmission

[Failed]
Failure! You're no good! Try again!

$Button=Continue,Tell,TryAgain

Now, when the player runs this campaign, it's typical of what we see in single player campaigns. Win the game, and proceed to nextmission. Lose the game, and repeat the level.

But what's to stop us from having the player play a different game when he/she loses? NOTHING!

Branching with [Failed]

What if after the player lost the game, we have them play a totally different, HARDER (or easier) game? Well, why not? The code would go something like this:

[Succeeded][BadTeamDead]
Success, you've killed all the enemies. Yahoo!

<$Config,Done{mission.fileName}=1>
$Button=Next Mission,MissionBegin,nextmission

[Failed]
Oh no! The enemies have succeeded in taking over one of your islands!
Your back is to the wall! It's going to be tough, but fight on!

$Button=Next Mission,MissionBegin,hardermission

Now, in the above example, if the player wins, they go on to nextmission, but if they lose, they branch to hardermission!

Usually, you would want it so that if the player wins hardermission, the game would then go to nextmission. So, in this case, it makes losing tougher to reach the end game of the series

Other things..

You don't have to branch only after [Succeeded][BadTeamDead] or [Failed]. You could branch after a priest was saved [ainPriestSaved], or captured [ainPriestCaptured], or for that matter, after any of the other [ain...] commands.

Possibilities...

What does all this mean? Well, you could have a campaign that has multiple, totally different endings! Say an ally is destroyed in one game. You wouldn't expect to see the ally in the next game. This could be accomplished with multiple branching. Or, you could have it so that if the player loses, the campaigns would focus on scenarios/weapons that the player needs experience with.

Try it out! It does work, and gives you, the creator of single player Netstorm games, one more option to make a really great campaign.

Advertisement