<?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=Trigger_count</id>
	<title>Trigger count - 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=Trigger_count"/>
	<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Trigger_count&amp;action=history"/>
	<updated>2026-11-15T14:30:06Z</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=Trigger_count&amp;diff=30969&amp;oldid=prev</id>
		<title>TopAce: bold, commas for better readability, some typos</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Trigger_count&amp;diff=30969&amp;oldid=prev"/>
		<updated>2010-09-11T18:16:32Z</updated>

		<summary type="html">&lt;p&gt;bold, commas for better readability, some typos&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 18:16, 11 September 2010&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; 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;Trigger count is a SCP feature developed as an alternative to repeat count, intended to function in a more intuitive fashion. Essentially, trigger count exists because repeat count doesn&#039;t do what a lot of people think it does. The bulk of this article comes from a post on the HLP Forums by Karajorma.&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;&#039;&#039;&#039;&lt;/ins&gt;Trigger count&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039; &lt;/ins&gt;is a SCP feature developed as an alternative to repeat count, intended to function in a more intuitive fashion. Essentially, trigger count exists because repeat count doesn&#039;t do what a lot of people think it does. The bulk of this article comes from a post on the HLP Forums by Karajorma.&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;== Quick explanation ==&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;== Quick explanation ==&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;Repeat Count - When a repeat count is set the repeat delay is the time when the event will next be tested. A repeat delay of 10s means that the event will be tested at 10, 20, 30, 40.....  seconds after the first time the SEXP is triggered.&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;Repeat Count - When a repeat count is set&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the repeat delay is the time when the event will next be tested. A repeat delay of 10s means that the event will be tested at 10, 20, 30, 40.....  seconds after the first time the SEXP is triggered.&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;Trigger count - When a trigger count is set the game waits the repeat delay and then sets the event back to being checked every frame until it is triggered again, when it waits the repeat delay again.&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;Trigger count - When a trigger count is set the game waits the repeat delay and then sets the event back to being checked every frame until it is triggered again, when it waits the repeat delay again.&lt;/div&gt;&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-l11&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;I&amp;#039;ll give an example of a SEXP and how you&amp;#039;d solve the problem in the past (using repeat count) and how you can solve it now using trigger count (or both).&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;I&amp;#039;ll give an example of a SEXP and how you&amp;#039;d solve the problem in the past (using repeat count) and how you can solve it now using trigger count (or both).&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;Let&#039;s suppose I have a target ship in a mission. If Alpha 1 is less &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;that &lt;/del&gt;100m from the ship I want a message sent every 10 seconds.&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;Let&#039;s suppose I have a target ship in a mission. If Alpha 1 is less &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;than &lt;/ins&gt;100m from the ship I want a message sent every 10 seconds.&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;I set up this event.&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;I set up this event.&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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l34&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&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;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;That probably seems reasonable but if you ran it you&#039;d find it didn&#039;t work. What would happen with this event is that the player triggers the event after 5 seconds the first time by flying into range. 10 seconds later the game checks if the player is in range again. If he is, another message is sent. Regardless of whether the message is sent or not the game now waits another 10 seconds to test again. In other words if the player flies within range 13 seconds later and back out again 19 seconds later they&#039;ll miss the test 20 seconds after the SEXP triggered and won&#039;t get the message sent.&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;That probably seems reasonable&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;but if you ran it&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;you&#039;d find it didn&#039;t work. What would happen with this event is that the player triggers the event after 5 seconds the first time by flying into range. 10 seconds later&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the game checks if the player is in range again. If he is, another message is sent. Regardless of whether the message is sent or not the game now waits another 10 seconds to test again. In other words&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;: &lt;/ins&gt;if the player flies within range 13 seconds later and back out again 19 seconds later they&#039;ll miss the test 20 seconds after the SEXP triggered and won&#039;t get the message sent.&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;In the past the solution was something like this.&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;In the past&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the solution was something like this.&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;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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l88&quot;&gt;Line 88:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 88:&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;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;Basically repeat count is simply being used to make the game check the event every second and the FREDder has to manually tell it to wait 10 seconds before checking by using a combination of variables to manually add the initial 10 second delay. But why should the FREDder have to tell the game to wait 10 seconds Wouldn&#039;t it be nice if we could get the game to do all that for us instead? That&#039;s what trigger count does. It tells the game wait the amount of time specified in the repeat delay and then trigger normally. Here&#039;s the same event using trigger count.&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;Basically repeat count is simply being used to make the game check the event every second and the FREDder has to manually tell it to wait 10 seconds before checking by using a combination of variables to manually add the initial 10&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/ins&gt;second delay. But why should the FREDder have to tell the game to wait 10 seconds&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;? &lt;/ins&gt;Wouldn&#039;t it be nice if we could get the game to do all that for us instead? That&#039;s what trigger count does. It tells the game wait the amount of time specified in the repeat delay and then trigger normally. Here&#039;s the same event using trigger count.&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;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 colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l111&quot;&gt;Line 111:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 111:&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;Notice how that is exactly the same as the original event except that I&amp;#039;ve swapped the trigger count and repeat count around? Trigger count works in the way many people think repeat count works.&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;Notice how that is exactly the same as the original event except that I&amp;#039;ve swapped the trigger count and repeat count around? Trigger count works in the way many people think repeat count works.&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;As for using both together, yes you can but it&#039;s really just a side effect of the way both work rather than a deliberately designed feature. Suppose we have a situation where you do want to check only every 10 seconds and want to stop sending messages after 3 have been sent regardless of how long it takes to get those three. Well in that case, you can either use a variable as a counter or you can do this.&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;As for using both together, yes you can&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;but it&#039;s really just a side effect of the way both work rather than a deliberately designed feature. Suppose we have a situation where you do want to check only every 10 seconds and want to stop sending messages after 3 have been sent regardless of how long it takes to get those three. Well in that case, you can either use a variable as a counter or you can do this.&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;{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&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;{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;/div&gt;&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-l131&quot;&gt;Line 131:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 131:&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;|}&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;|}&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;When both are specified the repeat count takes precedence. The game will test at 10 second spaces. But due to the fact that the game decrements both counts every time the event triggers you can use the trigger count as a built-in countdown counter for how many times the event has triggered. As soon as it reaches 0 the game won&#039;t trigger the event &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;any more&lt;/del&gt;, regardless of what the repeat counter is.&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;When both are specified&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the repeat count takes precedence. The game will test at 10&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-&lt;/ins&gt;second spaces. But due to the fact that the game decrements both counts every time the event triggers you can use the trigger count as a built-in countdown counter for how many times the event has triggered. As soon as it reaches 0&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the game won&#039;t trigger the event &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;anymore&lt;/ins&gt;, regardless of what the repeat counter is.&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;==Related Links==&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;==Related Links==&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=Trigger_count&amp;diff=26754&amp;oldid=prev</id>
		<title>TopAce: no categories and no links = no one will find it</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Trigger_count&amp;diff=26754&amp;oldid=prev"/>
		<updated>2009-11-09T13:24:14Z</updated>

		<summary type="html">&lt;p&gt;no categories and no links = no one will find it&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 13:24, 9 November 2009&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-l135&quot;&gt;Line 135:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 135:&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;==Related Links==&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;==Related Links==&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;*[http://www.hard-light.net/forums/index.php?topic=66502.msg1313166#msg1313166 | The original post by Karajorma]&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;*[http://www.hard-light.net/forums/index.php?topic=66502.msg1313166#msg1313166 | The original post by Karajorma]&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;[[Category:Source Code Project]]&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;[[Category:FRED]]&lt;/ins&gt;&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=Trigger_count&amp;diff=26751&amp;oldid=prev</id>
		<title>Black Wolf: Wikified Karajorma&#039;s post on HLP</title>
		<link rel="alternate" type="text/html" href="https://wiki.hard-light.org/index.php?title=Trigger_count&amp;diff=26751&amp;oldid=prev"/>
		<updated>2009-11-09T07:03:03Z</updated>

		<summary type="html">&lt;p&gt;Wikified Karajorma&amp;#039;s post on HLP&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Trigger count is a SCP feature developed as an alternative to repeat count, intended to function in a more intuitive fashion. Essentially, trigger count exists because repeat count doesn&amp;#039;t do what a lot of people think it does. The bulk of this article comes from a post on the HLP Forums by Karajorma.&lt;br /&gt;
&lt;br /&gt;
== Quick explanation ==&lt;br /&gt;
&lt;br /&gt;
Repeat Count - When a repeat count is set the repeat delay is the time when the event will next be tested. A repeat delay of 10s means that the event will be tested at 10, 20, 30, 40.....  seconds after the first time the SEXP is triggered.&lt;br /&gt;
&lt;br /&gt;
Trigger count - When a trigger count is set the game waits the repeat delay and then sets the event back to being checked every frame until it is triggered again, when it waits the repeat delay again.&lt;br /&gt;
&lt;br /&gt;
== Longer explanation ==&lt;br /&gt;
&lt;br /&gt;
I&amp;#039;ll give an example of a SEXP and how you&amp;#039;d solve the problem in the past (using repeat count) and how you can solve it now using trigger count (or both).&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s suppose I have a target ship in a mission. If Alpha 1 is less that 100m from the ship I want a message sent every 10 seconds.&lt;br /&gt;
I set up this event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #512020; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;&amp;lt;font face=&amp;quot;Courier New,Courier&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Player near Target&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
when&amp;lt;br&amp;gt;&lt;br /&gt;
- &amp;lt; &amp;lt;br&amp;gt;&lt;br /&gt;
--distance&amp;lt;br&amp;gt;&lt;br /&gt;
---Alpha 1&amp;lt;br&amp;gt;&lt;br /&gt;
---Target&amp;lt;br&amp;gt;&lt;br /&gt;
--100&amp;lt;br&amp;gt;&lt;br /&gt;
-Send Message&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #696969; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;Repeat count = 9999999, Trigger count = 1, Repeat delay = 10&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That probably seems reasonable but if you ran it you&amp;#039;d find it didn&amp;#039;t work. What would happen with this event is that the player triggers the event after 5 seconds the first time by flying into range. 10 seconds later the game checks if the player is in range again. If he is, another message is sent. Regardless of whether the message is sent or not the game now waits another 10 seconds to test again. In other words if the player flies within range 13 seconds later and back out again 19 seconds later they&amp;#039;ll miss the test 20 seconds after the SEXP triggered and won&amp;#039;t get the message sent.&lt;br /&gt;
&lt;br /&gt;
In the past the solution was something like this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #512020; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;&amp;lt;font face=&amp;quot;Courier New,Courier&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Player near Target&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
when&amp;lt;br&amp;gt;&lt;br /&gt;
-and&amp;lt;br&amp;gt;&lt;br /&gt;
- =&amp;lt;br&amp;gt;&lt;br /&gt;
-- OkToSendMessage[1]&amp;lt;br&amp;gt;&lt;br /&gt;
-- 1&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;lt;&amp;lt;br&amp;gt;&lt;br /&gt;
---distance&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;----&amp;lt;/nowiki&amp;gt;Alpha 1&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;----&amp;lt;/nowiki&amp;gt;Target&amp;lt;br&amp;gt;&lt;br /&gt;
---100&amp;lt;br&amp;gt;&lt;br /&gt;
-modify-variable&amp;lt;br&amp;gt;&lt;br /&gt;
--OkToSendMessage[1]&amp;lt;br&amp;gt;&lt;br /&gt;
--0&amp;lt;br&amp;gt;&lt;br /&gt;
-modify-variable&amp;lt;br&amp;gt;&lt;br /&gt;
--MessageSent[0]&amp;lt;br&amp;gt;&lt;br /&gt;
--mission-time&amp;lt;br&amp;gt;&lt;br /&gt;
-Send Message&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #696969; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;Repeat count = 9999999, Trigger count = 1, Repeat delay = 1&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #512020; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;&amp;lt;font face=&amp;quot;Courier New,Courier&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Reset Message&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
when&amp;lt;br&amp;gt;&lt;br /&gt;
-=&amp;lt;br&amp;gt;&lt;br /&gt;
--MessageSent[0]&amp;lt;br&amp;gt;&lt;br /&gt;
-- +&amp;lt;br&amp;gt;&lt;br /&gt;
---mission-time&amp;lt;br&amp;gt;&lt;br /&gt;
---10&amp;lt;br&amp;gt;&lt;br /&gt;
-modify-variable&amp;lt;br&amp;gt;&lt;br /&gt;
--OkToSendMessage[1]&amp;lt;br&amp;gt;&lt;br /&gt;
--1&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #696969; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;Repeat count = 9999999, Trigger count = 1, Repeat delay = 1&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically repeat count is simply being used to make the game check the event every second and the FREDder has to manually tell it to wait 10 seconds before checking by using a combination of variables to manually add the initial 10 second delay. But why should the FREDder have to tell the game to wait 10 seconds Wouldn&amp;#039;t it be nice if we could get the game to do all that for us instead? That&amp;#039;s what trigger count does. It tells the game wait the amount of time specified in the repeat delay and then trigger normally. Here&amp;#039;s the same event using trigger count.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #512020; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;&amp;lt;font face=&amp;quot;Courier New,Courier&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Player near Target &amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
when&amp;lt;br&amp;gt;&lt;br /&gt;
- &amp;lt;&amp;lt;br&amp;gt;&lt;br /&gt;
--distance&amp;lt;br&amp;gt;&lt;br /&gt;
---Alpha 1&amp;lt;br&amp;gt;&lt;br /&gt;
---Target&amp;lt;br&amp;gt;&lt;br /&gt;
--100&amp;lt;br&amp;gt;&lt;br /&gt;
-Send Message&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #696969; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;Repeat count = 1, Trigger count = 9999999, Repeat delay = 10&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notice how that is exactly the same as the original event except that I&amp;#039;ve swapped the trigger count and repeat count around? Trigger count works in the way many people think repeat count works.&lt;br /&gt;
&lt;br /&gt;
As for using both together, yes you can but it&amp;#039;s really just a side effect of the way both work rather than a deliberately designed feature. Suppose we have a situation where you do want to check only every 10 seconds and want to stop sending messages after 3 have been sent regardless of how long it takes to get those three. Well in that case, you can either use a variable as a counter or you can do this.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #512020; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;&amp;lt;font face=&amp;quot;Courier New,Courier&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;&amp;#039;&amp;#039;&amp;#039;Player near Target &amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
when&amp;lt;br&amp;gt;&lt;br /&gt;
- &amp;lt;&amp;lt;br&amp;gt;&lt;br /&gt;
--distance&amp;lt;br&amp;gt;&lt;br /&gt;
---Alpha 1&amp;lt;br&amp;gt;&lt;br /&gt;
---Target&amp;lt;br&amp;gt;&lt;br /&gt;
--100&amp;lt;br&amp;gt;&lt;br /&gt;
-Send Message&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| style=&amp;quot;width:500px; border:1px #AA2020 solid; background:;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:500px; text-align:left; background: #696969; white-space:nowrap; color:#000;&amp;quot;|&lt;br /&gt;
&amp;lt;div style=&amp;quot;font-size:100%; border:none; margin:0; padding:.1em; color:#FFF;&amp;quot;&amp;gt;Repeat count = 9999999, Trigger count = 3, Repeat delay = 10&amp;lt;/div&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When both are specified the repeat count takes precedence. The game will test at 10 second spaces. But due to the fact that the game decrements both counts every time the event triggers you can use the trigger count as a built-in countdown counter for how many times the event has triggered. As soon as it reaches 0 the game won&amp;#039;t trigger the event any more, regardless of what the repeat counter is.&lt;br /&gt;
&lt;br /&gt;
==Related Links==&lt;br /&gt;
*[http://www.hard-light.net/forums/index.php?topic=66502.msg1313166#msg1313166 | The original post by Karajorma]&lt;/div&gt;</summary>
		<author><name>Black Wolf</name></author>
	</entry>
</feed>