<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fortress-forever.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Lua%3Atrigger_ff_script</id>
	<title>Lua:trigger ff script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fortress-forever.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Lua%3Atrigger_ff_script"/>
	<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:trigger_ff_script&amp;action=history"/>
	<updated>2026-05-08T15:18:55Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:trigger_ff_script&amp;diff=9451&amp;oldid=prev</id>
		<title>Crazycarl at 02:19, 19 March 2010</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:trigger_ff_script&amp;diff=9451&amp;oldid=prev"/>
		<updated>2010-03-19T02:19:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 02:19, 19 March 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-l28&quot; &gt;Line 28:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 28:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;==Events==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;==Events==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;allowed&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;allowed_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;allowed&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;allowed_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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 class=&quot;diffchange diffchange-inline&quot;&gt;Called when the engine needs to know if &lt;/del&gt;the player &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;first parameter of this function is allowed to &lt;/del&gt;trigger &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this entity&lt;/del&gt;. Return true &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;from this function &lt;/del&gt;if the trigger is allowed, otherwise return false.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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 class=&quot;diffchange diffchange-inline&quot;&gt;Decides whether &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;entity &amp;#039;&amp;#039;allowed_entity&amp;#039;&amp;#039; (usually a &lt;/ins&gt;player&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) may activate &lt;/ins&gt;the trigger. Return &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&lt;/ins&gt;true&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039; &lt;/ins&gt;if the trigger is allowed, otherwise return &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&lt;/ins&gt;false&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;onfailtouch&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;touch_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;onfailtouch&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;touch_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when allowed() returns false.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when allowed() returns false&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. &amp;#039;&amp;#039;touch_entity&amp;#039;&amp;#039; refers to the entity that was tested earlier&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;ontouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;ontouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a player &lt;/del&gt;starts touching &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this entity&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;an entity &lt;/ins&gt;starts touching &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the trigger&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;onendtouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;onendtouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a player &lt;/del&gt;stops touching &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;this entity&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;an entity &lt;/ins&gt;stops touching &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the trigger&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;ontrigger&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;trigger_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;=== &amp;#039;&amp;#039;&amp;#039;ontrigger&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;trigger_entity&amp;#039;&amp;#039; ) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when this entity is triggered. Note that this takes into account the wait time of this trigger, whereas ontouch() does not.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when this entity is triggered. Note that this takes into account the wait time of this trigger, whereas ontouch() does not.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;===onbuild( build_entity )===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when someone tries to place [[Buildables]] inside the trigger. &amp;#039;&amp;#039;build_entity&amp;#039;&amp;#039; refers to the thing being built. Return &amp;#039;&amp;#039;false&amp;#039;&amp;#039; or &amp;#039;&amp;#039;EVENT_DISALLOWED&amp;#039;&amp;#039; to prevent the player from building.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;===onexplode( explode_entity )===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when something (such as a grenade or detpack) is about to explode inside the trigger. &amp;#039;&amp;#039;explode_entity&amp;#039;&amp;#039; refers to the thing exploding. Return &amp;#039;&amp;#039;false&amp;#039;&amp;#039; or &amp;#039;&amp;#039;EVENT_DISALLOWED&amp;#039;&amp;#039; to prevent the explosion from occurring. Return &amp;#039;&amp;#039;EVENT_ALLOWED&amp;#039;&amp;#039; to allow the explosion.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;===oninfect( infect_entity )===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;Called when a player is about to become infected when inside the trigger. Return &amp;#039;&amp;#039;false&amp;#039;&amp;#039; or &amp;#039;&amp;#039;EVENT_DISALLOWED&amp;#039;&amp;#039; to prevent the player from being infected.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;[[Category:Lua]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&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;{{Infobox manual/Footer}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&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;{{Infobox manual/Footer}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Crazycarl</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:trigger_ff_script&amp;diff=9163&amp;oldid=prev</id>
		<title>Crazycarl: New page: {{Infobox manual/Header}} == trigger_ff_script== This entity is functionally the same as trigger_multiple. Most of these functions will also work with the other trigger_* entities.  A trig...</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:trigger_ff_script&amp;diff=9163&amp;oldid=prev"/>
		<updated>2009-06-27T03:49:56Z</updated>

		<summary type="html">&lt;p&gt;New page: {{Infobox manual/Header}} == trigger_ff_script== This entity is functionally the same as trigger_multiple. Most of these functions will also work with the other trigger_* entities.  A trig...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
== trigger_ff_script==&lt;br /&gt;
This entity is functionally the same as trigger_multiple. Most of these functions will also work with the other trigger_* entities.&lt;br /&gt;
&lt;br /&gt;
A trigger_ff_script is a brush-based scriptable entity.  Unlike most Source entities, which represent one type of object and have predetermined behavior, the scriptability behind this entity makes it extremely flexibile.&lt;br /&gt;
&lt;br /&gt;
trigger_ff_script entities represent areas that can affect, and be affected by players. Such items might be the capture points in a CTF map, nobuild areas, or team-killing laser fields.&lt;br /&gt;
&lt;br /&gt;
These entities are placed in a map editor, such as Hammer, and must be given a name in order to function correctly.  This name will be used to link it into the map&amp;#039;s corresponding Lua file.  So, whenever you put a named trigger_ff_script entity in your map, the game attempts to find a correspondingly named function in &amp;#039;&amp;#039;&amp;#039;mapname&amp;#039;&amp;#039;&amp;#039;.lua.&lt;br /&gt;
&lt;br /&gt;
FF includes a number of pre-existing game modes that require very little work to implement in your own maps--that is, assuming your map&amp;#039;s gameplay is similar enough to one of these templates.  You&amp;#039;ll simply need to add the appropriate entities, give them the proper names, and you&amp;#039;re all set. More on that can be found by looking at the available [[map templates]].&lt;br /&gt;
&lt;br /&gt;
==Creating a trigger_ff_script==&lt;br /&gt;
&lt;br /&gt;
 -- This is my first base trigger!&lt;br /&gt;
 endzone = trigger_ff_script:new({&lt;br /&gt;
        points_per_score = 6,&lt;br /&gt;
        fortpoints_per_score = 100&lt;br /&gt;
        allowedmethod = redTeamOnly&lt;br /&gt;
 })&lt;br /&gt;
 --Access to events is typically in the following format:&lt;br /&gt;
 &lt;br /&gt;
 function endzone:ontrigger( entity )&lt;br /&gt;
   --What to do when this method is called&lt;br /&gt;
   --return anything, if necessary&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
==Events==&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;allowed&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;allowed_entity&amp;#039;&amp;#039; ) ===&lt;br /&gt;
Called when the engine needs to know if the player in the first parameter of this function is allowed to trigger this entity. Return true from this function if the trigger is allowed, otherwise return false.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;onfailtouch&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;touch_entity&amp;#039;&amp;#039; ) ===&lt;br /&gt;
Called when allowed() returns false.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;ontouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;br /&gt;
Called when a player starts touching this entity.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;onendtouch&amp;#039;&amp;#039;&amp;#039;( trigger_entity ) ===&lt;br /&gt;
Called when a player stops touching this entity.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;ontrigger&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;trigger_entity&amp;#039;&amp;#039; ) ===&lt;br /&gt;
Called when this entity is triggered. Note that this takes into account the wait time of this trigger, whereas ontouch() does not.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>Crazycarl</name></author>
	</entry>
</feed>