<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.hard-light.org/index.php?action=history&amp;feed=atom&amp;title=Counting_with_variables</id>
	<title>Counting with variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hard-light.org/index.php?action=history&amp;feed=atom&amp;title=Counting_with_variables"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;action=history"/>
	<updated>2026-11-15T14:38:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=35560&amp;oldid=prev</id>
		<title>TopAce: /* Example mission */ missing letter</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=35560&amp;oldid=prev"/>
		<updated>2011-07-16T09:27:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example mission: &lt;/span&gt; missing letter&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:27, 16 July 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Grab the basic mission [http://www.mediafire.com/?euitbdb52ph5uc5 here]. Add the new events yourself, based on this tutorial.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Grab the basic mission [http://www.mediafire.com/?euitbdb52ph5uc5 here]. Add the new events yourself, based on this tutorial.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This example mission is similar to [[Doomsday]], but engineered for the purposes of this tutorial. The GTD &#039;&#039;Galatea&#039;&#039; deploys 8 escape pods, which must be protected. For simplicity&#039;s sake, there are no enemies, but the player can destroy the pods himself to have a better control over the mission outcome. The traitor mechanism has been &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;disable &lt;/del&gt;also.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This example mission is similar to [[Doomsday]], but engineered for the purposes of this tutorial. The GTD &#039;&#039;Galatea&#039;&#039; deploys 8 escape pods, which must be protected. For simplicity&#039;s sake, there are no enemies, but the player can destroy the pods himself to have a better control over the mission outcome. The traitor mechanism has been &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;disabled &lt;/ins&gt;also.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Set up variables==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Set up variables==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopAce</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34798&amp;oldid=prev</id>
		<title>TopAce: /* Requirements */ word choice</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34798&amp;oldid=prev"/>
		<updated>2011-05-25T11:44:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Requirements: &lt;/span&gt; word choice&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:44, 25 May 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This tutorial teaches you how to combine when-argument and variables.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This tutorial teaches you how to combine when-argument and variables.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Requirements&lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Prerequisites&lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*FreeSpace Open 3.6.12 (minimum)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*FreeSpace Open 3.6.12 (minimum)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Basic knowledge of [[SEXP]]s&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Basic knowledge of [[SEXP]]s&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopAce</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34403&amp;oldid=prev</id>
		<title>TopAce: forgot something</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34403&amp;oldid=prev"/>
		<updated>2011-04-24T12:14:05Z</updated>

		<summary type="html">&lt;p&gt;forgot something&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:14, 24 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l63&quot;&gt;Line 63:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 63:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Time to put our @EPDealtWith variable to use. In this example mission, you receive the &amp;quot;Return to base&amp;quot; order once the fates of all 8 escape pods are sealed. The two variables that we have been dealing with counted the pods separately. For the RTB order, we need a variable that counts how many pods have been destroyed &amp;#039;&amp;#039;or&amp;#039;&amp;#039; departed. Once this variable hits 8, the RTB directive is triggered.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Time to put our @EPDealtWith variable to use. In this example mission, you receive the &amp;quot;Return to base&amp;quot; order once the fates of all 8 escape pods are sealed. The two variables that we have been dealing with counted the pods separately. For the RTB order, we need a variable that counts how many pods have been destroyed &amp;#039;&amp;#039;or&amp;#039;&amp;#039; departed. Once this variable hits 8, the RTB directive is triggered.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Finally==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Grab the complete mission file [http://www.mediafire.com/?ce5f5jp8g4yktzy here] and juxtapose it with your version.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Exercises==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Exercises==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Duplicate the mission file and do the exercises in a separate mission file.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Duplicate the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(complete) &lt;/ins&gt;mission file and do the exercises in a separate mission file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Add the debriefing stages with the following specifications:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#Add the debriefing stages with the following specifications:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopAce</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34402&amp;oldid=prev</id>
		<title>TopAce: /* RTB directive */</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34402&amp;oldid=prev"/>
		<updated>2011-04-24T12:12:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;RTB directive&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:12, 24 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l60&quot;&gt;Line 60:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This step is optional.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This step is optional.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:CountDealtWith]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Image:CountDealtWith&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.jpg&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Time to put our @EPDealtWith variable to use. In this example mission, you receive the &amp;quot;Return to base&amp;quot; order once the fates of all 8 escape pods are sealed. The two variables that we have been dealing with counted the pods separately. For the RTB order, we need a variable that counts how many pods have been destroyed &amp;#039;&amp;#039;or&amp;#039;&amp;#039; departed. Once this variable hits 8, the RTB directive is triggered.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Time to put our @EPDealtWith variable to use. In this example mission, you receive the &amp;quot;Return to base&amp;quot; order once the fates of all 8 escape pods are sealed. The two variables that we have been dealing with counted the pods separately. For the RTB order, we need a variable that counts how many pods have been destroyed &amp;#039;&amp;#039;or&amp;#039;&amp;#039; departed. Once this variable hits 8, the RTB directive is triggered.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TopAce</name></author>
	</entry>
	<entry>
		<id>https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34401&amp;oldid=prev</id>
		<title>TopAce: Created page with &quot;This tutorial teaches you how to combine when-argument and variables.  ==Requirements== *FreeSpace Open 3.6.12 (minimum) *Basic knowledge of SEXPs *Basic knowledge of [[varia…&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Counting_with_variables&amp;diff=34401&amp;oldid=prev"/>
		<updated>2011-04-24T12:12:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This tutorial teaches you how to combine when-argument and variables.  ==Requirements== *FreeSpace Open 3.6.12 (minimum) *Basic knowledge of &lt;a href=&quot;/index.php/SEXP&quot; title=&quot;SEXP&quot;&gt;SEXPs&lt;/a&gt; *Basic knowledge of [[varia…&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This tutorial teaches you how to combine when-argument and variables.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
*FreeSpace Open 3.6.12 (minimum)&lt;br /&gt;
*Basic knowledge of [[SEXP]]s&lt;br /&gt;
*Basic knowledge of [[variable]]s&lt;br /&gt;
*Basic knowledge of mission messages&lt;br /&gt;
&lt;br /&gt;
==Example mission==&lt;br /&gt;
Grab the basic mission [http://www.mediafire.com/?euitbdb52ph5uc5 here]. Add the new events yourself, based on this tutorial.&lt;br /&gt;
&lt;br /&gt;
This example mission is similar to [[Doomsday]], but engineered for the purposes of this tutorial. The GTD &amp;#039;&amp;#039;Galatea&amp;#039;&amp;#039; deploys 8 escape pods, which must be protected. For simplicity&amp;#039;s sake, there are no enemies, but the player can destroy the pods himself to have a better control over the mission outcome. The traitor mechanism has been disable also.&lt;br /&gt;
&lt;br /&gt;
==Set up variables==&lt;br /&gt;
The mission requires three variables. The name of the variable doesn&amp;#039;t matter, as long as you recognize what it stands for, it will not cause a problem. All these are number variables, with a default value of 0.&lt;br /&gt;
*@EPDeparted: Counts how many pods escaped&lt;br /&gt;
*@EPDestroyed: Counts how many were destroyed&lt;br /&gt;
*@EPDealtWith: Counts how many pods are out of the picture (destroyed or departed). This third one is needed for the [[Return to base directive|RTB directive]]. If you don&amp;#039;t want to tie your RTB trigger to this, you can skip this variable.&lt;br /&gt;
&lt;br /&gt;
The @ notation indicates a variable. When creating the variables, you &amp;#039;&amp;#039;&amp;#039;must not&amp;#039;&amp;#039;&amp;#039; include this notation.&lt;br /&gt;
&lt;br /&gt;
==Counting events==&lt;br /&gt;
We need two events, one that counts how many pods were destroyed and one that counts how many departed.&lt;br /&gt;
&lt;br /&gt;
[[Image:CountDestroyed.jpg]]&lt;br /&gt;
&lt;br /&gt;
This is just the event that counts the destroyed pods. The event that counts the departed pods is the same, with &amp;#039;&amp;#039;is-destroyed-delay&amp;#039;&amp;#039; changed to &amp;#039;&amp;#039;has-departed-delay&amp;#039;&amp;#039; and the variable changed to EPDeparted.&lt;br /&gt;
&lt;br /&gt;
And here are the relevant notions explained one by one.&lt;br /&gt;
&lt;br /&gt;
===[[when-argument]] and [[any-of]]===&lt;br /&gt;
Each line under any-of must match the name of an escape pod. This line will be furthermore referred to as an &amp;quot;argument.&amp;quot; When inputting each argument, make sure there are no typos in it. To add an argument, right-click on &amp;#039;&amp;#039;any-of&amp;#039;&amp;#039; --&amp;gt; Add Data --&amp;gt; String&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;argument&amp;gt;===&lt;br /&gt;
This refers to the arguments below any-of. If any of the escape pods (which are the arguments) are destroyed, it will trigger the event.&lt;br /&gt;
&lt;br /&gt;
===modify-variable===&lt;br /&gt;
Once the event is triggered, [[modify-variable]] is used to add 1 to a variable. If a pod is destroyed, @EPDestroyed is increased by 1; if a pod departs, @EPDeparted is increased by 1.&lt;br /&gt;
&lt;br /&gt;
===invalidate-argument===&lt;br /&gt;
Removes the already activated argument from the event to make sure the same pod doesn&amp;#039;t get counted twice. If you forget to invalidate the already triggered argument, the mission will break. Notice that by default, this SEXP&amp;#039;s default argument is &amp;lt;any data&amp;gt;, not &amp;lt;argument&amp;gt;. Right click on &amp;lt;any data&amp;gt; --&amp;gt; Replace Data --&amp;gt; &amp;lt;argument&amp;gt;. &amp;#039;&amp;#039;Invalidate-argument&amp;#039;&amp;#039; is always at the end of the SEXP tree.&lt;br /&gt;
&lt;br /&gt;
===Trigger count===&lt;br /&gt;
Trigger count must be as high as the number of arguments under &amp;#039;&amp;#039;any-of&amp;#039;&amp;#039;. Note: This is &amp;#039;&amp;#039;&amp;#039;trigger count&amp;#039;&amp;#039;&amp;#039;, not &amp;#039;&amp;#039;&amp;#039;repeat count&amp;#039;&amp;#039;&amp;#039; (see [[trigger count|this]] for explanation).&lt;br /&gt;
&lt;br /&gt;
==Error checking==&lt;br /&gt;
This step is optional.&lt;br /&gt;
&lt;br /&gt;
You can check if your events were set up properly in-flight, through messages.&lt;br /&gt;
&lt;br /&gt;
Set up this new message:&lt;br /&gt;
&lt;br /&gt;
 Departed: $EPDeparted Destroyed: $EPDestroyed Dealt With: $EPDealtWith&lt;br /&gt;
&lt;br /&gt;
Have this message sent with each event that modifies a variable. Now, every time a variable changes, it will be communicated to you in-mission. Notice the $ symbol.&lt;br /&gt;
&lt;br /&gt;
Obviously, if you don&amp;#039;t want to work with @EPDealtWith, then remove it from the message.&lt;br /&gt;
&lt;br /&gt;
==RTB directive==&lt;br /&gt;
This step is optional.&lt;br /&gt;
&lt;br /&gt;
[[Image:CountDealtWith]]&lt;br /&gt;
&lt;br /&gt;
Time to put our @EPDealtWith variable to use. In this example mission, you receive the &amp;quot;Return to base&amp;quot; order once the fates of all 8 escape pods are sealed. The two variables that we have been dealing with counted the pods separately. For the RTB order, we need a variable that counts how many pods have been destroyed &amp;#039;&amp;#039;or&amp;#039;&amp;#039; departed. Once this variable hits 8, the RTB directive is triggered.&lt;br /&gt;
&lt;br /&gt;
==Exercises==&lt;br /&gt;
Duplicate the mission file and do the exercises in a separate mission file.&lt;br /&gt;
&lt;br /&gt;
#Add the debriefing stages with the following specifications:&lt;br /&gt;
##8 pods saved: &amp;quot;Excellent work. All pods have been saved.&amp;quot;&lt;br /&gt;
##5-7 pods saved: &amp;quot;A handful of escape pods survived the engagement. The survivors are being transferred to the GTD Bastion as we speak.&amp;quot;&lt;br /&gt;
##1-4 pods saved: &amp;quot;We lost many good people today.&amp;quot;&lt;br /&gt;
##0 pods saved: &amp;quot;It&amp;#039;s incredible that you failed to save a single pod. You are responsible for hundreds of deaths today.&amp;quot;&lt;br /&gt;
##If the player goes AWOL, only the default AWOL message must appear.&lt;br /&gt;
#Add a &amp;quot;Protect Escape Pods&amp;quot; mission goal with the following specifications:&lt;br /&gt;
##The mission goal turns complete when at least 5 pods are saved.&lt;br /&gt;
##The mission goal fails when at least 4 pods are destroyed.&lt;br /&gt;
##The mission goal is only displayed once all 8 pods have been destroyed or jumped.&lt;br /&gt;
#(in yet another separate file) Remove two escape pods and edit the mission events accordingly.&lt;br /&gt;
&lt;br /&gt;
[[Category:FRED Examples]]&lt;/div&gt;</summary>
		<author><name>TopAce</name></author>
	</entry>
</feed>