<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fortress-forever.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stevenm64-10860</id>
	<title>Fortress Forever Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.fortress-forever.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stevenm64-10860"/>
	<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Special:Contributions/Stevenm64-10860"/>
	<updated>2026-06-20T19:52:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayerInNoBuild&amp;diff=4432</id>
		<title>Lua:IsPlayerInNoBuild</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayerInNoBuild&amp;diff=4432"/>
		<updated>2007-12-20T01:48:40Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: fixed links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsPlayerInNoBuild==&lt;br /&gt;
&lt;br /&gt;
IsPlayerInNoBuild is used to see if a player is in a &amp;quot;[[:lua:nobuild|nobuild]]&amp;quot; area. By default, a trigger_ff_script named &amp;quot;[[:lua:nobuild|nobuild]]&amp;quot; will not allow players to build while the player is touching the &amp;quot;nobuild&amp;quot; trigger_ff_script entity.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsPlayerInNoBuild( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a player and then if the player is in a &amp;quot;[[:lua:nobuild|nobuild]]&amp;quot; area or not.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4431</id>
		<title>Lua:IsGrenInNoGren</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4431"/>
		<updated>2007-12-20T01:47:18Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Fixed grenade links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsGrenInNoGren==&lt;br /&gt;
&lt;br /&gt;
IsGrenInNoGren is used to see if a grenade is in a &amp;quot;[[:lua:nogrens|nogrens]]&amp;quot; area. By default, a trigger_ff_script named &amp;quot;[[:lua:nogrens|nogrens]]&amp;quot; will not allow grenades to explode while the grenade is touching the &amp;quot;nogrens&amp;quot; trigger_ff_script entity.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsGrenInNoGren( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a grenade and then if the grenade is in a &amp;quot;[[:lua:nogrens|nogrens]]&amp;quot; area or not. A list of grenades can be found [[:Category:Grenades|here]].&lt;br /&gt;
&lt;br /&gt;
==Important Note==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you want trigger&amp;#039;s to react to grenades you MUST &amp;#039;check&amp;#039;/&amp;#039;tick&amp;#039; the &amp;quot;everything&amp;quot; option on the flags tab of the entity in Hammer.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[image:tick-everything.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4430</id>
		<title>Lua:IsGrenInNoGren</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4430"/>
		<updated>2007-12-20T01:45:10Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: relinked img external link to local uploaded file.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsGrenInNoGren==&lt;br /&gt;
&lt;br /&gt;
IsGrenInNoGren is used to see if a grenade is in a &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; area. By default, a trigger_ff_script named &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; will not allow grenades to explode while the grenade is touching the &amp;quot;nogrens&amp;quot; trigger_ff_script entity.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsGrenInNoGren( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a grenade and then if the grenade is in a &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; area or not. A list of grenades can be found [[:Category:Grenades|here]].&lt;br /&gt;
&lt;br /&gt;
==Important Note==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you want trigger&amp;#039;s to react to grenades you MUST &amp;#039;check&amp;#039;/&amp;#039;tick&amp;#039; the &amp;quot;everything&amp;quot; option on the flags tab of the entity in Hammer.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[image:tick-everything.JPG]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=File:Tick-everything.JPG&amp;diff=4429</id>
		<title>File:Tick-everything.JPG</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=File:Tick-everything.JPG&amp;diff=4429"/>
		<updated>2007-12-20T01:43:29Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: relinked external link to local uploaded file.
http://mulchman.trepid.net/tick-everything.JPG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;relinked external link to local uploaded file.&lt;br /&gt;
http://mulchman.trepid.net/tick-everything.JPG&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_spawn&amp;diff=4366</id>
		<title>Lua:Player spawn</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_spawn&amp;diff=4366"/>
		<updated>2007-12-14T14:55:26Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player spawn moved to Lua:player spawn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Lua:player spawn]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_spawn&amp;diff=4365</id>
		<title>Lua:player spawn</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_spawn&amp;diff=4365"/>
		<updated>2007-12-14T14:55:26Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player spawn moved to Lua:player spawn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called whenever a player spawns in the map.&lt;br /&gt;
&lt;br /&gt;
Here is an example of giving the player full health, full armor, full rockets, full shells, and 1 grenade upon spawning (player_id is the player this event is called on and must be passed in to the functions used as shown in the example):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_spawn( player_id )&lt;br /&gt;
	-- 400 for overkill. of course the values&lt;br /&gt;
	-- get clamped in game code&lt;br /&gt;
	AddHealth( player_id, 400 )&lt;br /&gt;
	AddArmor( player_id, 400 )&lt;br /&gt;
&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_NAILS&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_SHELLS&amp;quot;, 400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_ROCKETS&amp;quot;, 400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_CELLS&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_DETPACK&amp;quot;, -1 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_RADIOTAG&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN1&amp;quot;, -4 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN2&amp;quot;, -4 )&lt;br /&gt;
&lt;br /&gt;
	-- Players get 1 gren1&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN1&amp;quot;, 1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_ondamage&amp;diff=4364</id>
		<title>Lua:Player ondamage</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_ondamage&amp;diff=4364"/>
		<updated>2007-12-14T14:51:51Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player ondamage moved to Lua:player ondamage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Lua:player ondamage]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_ondamage&amp;diff=4363</id>
		<title>Lua:player ondamage</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_ondamage&amp;diff=4363"/>
		<updated>2007-12-14T14:51:51Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player ondamage moved to Lua:player ondamage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called whenever a player takes damage. The following variables are set in the global lua namespace before this function is called:&lt;br /&gt;
*info_damage: The amount of damage that the player will recieve.&lt;br /&gt;
*info_attacker: The player that fired the attack.&lt;br /&gt;
*info_classname: The classname of the weapon that hit the player. Note that this may be the classname of the projectile for projectile weapons, or the classname of the weapon for non-projectile weapons.&lt;br /&gt;
This function may modify the info_damage global variable in the global scope. If it does, the damage the player takes will be changed. This means that the script for a map can make players recieve more  or less damage through scripting. Here is an example script that makes the player take no damage from the super shotgun.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_ondamage(player_id)&lt;br /&gt;
	ConsoleToAll(GetPlayerName(info_attacker)..&amp;quot; shot &amp;quot;..GetPlayerName(player_id)..&amp;quot; with a &amp;quot;..info_classname..&amp;quot; for &amp;quot;..info_damage..&amp;quot; damage&amp;quot;)&lt;br /&gt;
	if info_classname == &amp;quot;ff_weapon_supershotgun&amp;quot; then&lt;br /&gt;
		ConsoleToAll(&amp;quot;Take no damage from supershotty&amp;quot;)&lt;br /&gt;
		info_damage = 0&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s another example in case you wanted to not take damage from your own rockets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_ondamage( player_id )&lt;br /&gt;
&lt;br /&gt;
	-- Don&amp;#039;t take rocket damage from ourselves&lt;br /&gt;
	if ( player_id == info_attacker ) then&lt;br /&gt;
		if ( info_classname == &amp;quot;rocket&amp;quot; ) then&lt;br /&gt;
			info_damage = 0&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_killed&amp;diff=4362</id>
		<title>Lua:Player killed</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Player_killed&amp;diff=4362"/>
		<updated>2007-12-14T14:49:46Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player killed moved to Lua:player killed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Lua:player killed]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_killed&amp;diff=4361</id>
		<title>Lua:player killed</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_killed&amp;diff=4361"/>
		<updated>2007-12-14T14:49:46Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Lua:Player killed moved to Lua:player killed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called whenever a player dies. The global variable &amp;quot;killer&amp;quot; will be set, which contains the player that killed this player.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an example if you wanted to give your team a point when you killed someone not on your team:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_killed( player_id )&lt;br /&gt;
	-- If you kill someone, give your team a point&lt;br /&gt;
	if GetPlayerTeam( killer ) then&lt;br /&gt;
		if not ( GetPlayerTeam( player_id ) == GetPlayerTeam( killer ) ) then&lt;br /&gt;
			AddTeamScore( GetPlayerTeam( killer ), 1 )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4360</id>
		<title>Lua Commands</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4360"/>
		<updated>2007-12-14T14:32:07Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Redirecting to Category:Lua Commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Category:Lua_Commands]]&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4359</id>
		<title>Lua Commands</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4359"/>
		<updated>2007-12-14T14:30:07Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Undo revision 4262 by Mirvinmonkey-3 (Talk) Pointless, only one list of the commands will need to be kept on the category page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Category:LUA_Commands]]&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Startup&amp;diff=4184</id>
		<title>Lua:Startup</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Startup&amp;diff=4184"/>
		<updated>2007-12-13T05:36:40Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page: This function is called when the map starts, after all the entities have been initialized. The main purpose of this function is to set properties of entities or teams, as well as initializ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called when the map starts, after all the entities have been initialized. The main purpose of this function is to set properties of entities or teams, as well as initialize lua variables. Note that lua variables may be initialized outside this function however.&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Precache&amp;diff=4182</id>
		<title>Lua:Precache</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Precache&amp;diff=4182"/>
		<updated>2007-12-13T05:35:39Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page: This function is called when the map starts, before entities have been initialized. The main purpose of this is to precache all resources for the map.    Category:LUA Commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called when the map starts, before entities have been initialized. The main purpose of this is to precache all resources for the map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Tick&amp;diff=4181</id>
		<title>Lua:Tick</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Tick&amp;diff=4181"/>
		<updated>2007-12-13T05:34:35Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page:  This function is called every second by the engine. Note that this function is in use by base.lua, so should not be declared again. To interface with this command, it must be hooked. ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This function is called every second by the engine. Note that this function is in use by base.lua, so should not be declared again. To interface with this command, it must be [[hooked]]. A better method would be to use the scheduling interface may be found in the scheduling section of the API.&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_ondamage&amp;diff=4177</id>
		<title>Lua:player ondamage</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_ondamage&amp;diff=4177"/>
		<updated>2007-12-13T05:18:45Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page: This function is called whenever a player takes damage. The following variables are set in the global lua namespace before this function is called: *info_damage: The amount of damage that ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called whenever a player takes damage. The following variables are set in the global lua namespace before this function is called:&lt;br /&gt;
*info_damage: The amount of damage that the player will recieve.&lt;br /&gt;
*info_attacker: The player that fired the attack.&lt;br /&gt;
*info_classname: The classname of the weapon that hit the player. Note that this may be the classname of the projectile for projectile weapons, or the classname of the weapon for non-projectile weapons.&lt;br /&gt;
This function may modify the info_damage global variable in the global scope. If it does, the damage the player takes will be changed. This means that the script for a map can make players recieve more  or less damage through scripting. Here is an example script that makes the player take no damage from the super shotgun.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_ondamage(player_id)&lt;br /&gt;
	ConsoleToAll(GetPlayerName(info_attacker)..&amp;quot; shot &amp;quot;..GetPlayerName(player_id)..&amp;quot; with a &amp;quot;..info_classname..&amp;quot; for &amp;quot;..info_damage..&amp;quot; damage&amp;quot;)&lt;br /&gt;
	if info_classname == &amp;quot;ff_weapon_supershotgun&amp;quot; then&lt;br /&gt;
		ConsoleToAll(&amp;quot;Take no damage from supershotty&amp;quot;)&lt;br /&gt;
		info_damage = 0&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s another example in case you wanted to not take damage from your own rockets:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_ondamage( player_id )&lt;br /&gt;
&lt;br /&gt;
	-- Don&amp;#039;t take rocket damage from ourselves&lt;br /&gt;
	if ( player_id == info_attacker ) then&lt;br /&gt;
		if ( info_classname == &amp;quot;rocket&amp;quot; ) then&lt;br /&gt;
			info_damage = 0&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_killed&amp;diff=4175</id>
		<title>Lua:player killed</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_killed&amp;diff=4175"/>
		<updated>2007-12-13T05:13:16Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page:  This function is called whenever a player dies. The global variable &amp;quot;killer&amp;quot; will be set, which contains the player that killed this player.  Here&amp;#039;s an example if you wanted to give your ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This function is called whenever a player dies. The global variable &amp;quot;killer&amp;quot; will be set, which contains the player that killed this player.&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s an example if you wanted to give your team a point when you killed someone not on your team:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_killed( player_id )&lt;br /&gt;
	-- If you kill someone, give your team a point&lt;br /&gt;
	if GetPlayerTeam( killer ) then&lt;br /&gt;
		if not ( GetPlayerTeam( player_id ) == GetPlayerTeam( killer ) ) then&lt;br /&gt;
			AddTeamScore( GetPlayerTeam( killer ), 1 )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:player_spawn&amp;diff=4174</id>
		<title>Lua:player spawn</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:player_spawn&amp;diff=4174"/>
		<updated>2007-12-13T05:11:30Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page: This function is called whenever a player spawns in the map.  Here is an example of giving the player full health, full armor, full rockets, full shells, and 1 grenade upon spawning (playe...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This function is called whenever a player spawns in the map.&lt;br /&gt;
&lt;br /&gt;
Here is an example of giving the player full health, full armor, full rockets, full shells, and 1 grenade upon spawning (player_id is the player this event is called on and must be passed in to the functions used as shown in the example):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_spawn( player_id )&lt;br /&gt;
	-- 400 for overkill. of course the values&lt;br /&gt;
	-- get clamped in game code&lt;br /&gt;
	AddHealth( player_id, 400 )&lt;br /&gt;
	AddArmor( player_id, 400 )&lt;br /&gt;
&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_NAILS&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_SHELLS&amp;quot;, 400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_ROCKETS&amp;quot;, 400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_CELLS&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_DETPACK&amp;quot;, -1 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_RADIOTAG&amp;quot;, -400 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN1&amp;quot;, -4 )&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN2&amp;quot;, -4 )&lt;br /&gt;
&lt;br /&gt;
	-- Players get 1 gren1&lt;br /&gt;
	AddAmmo( player_id, &amp;quot;AMMO_GREN1&amp;quot;, 1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Talk:Lua:Interaction&amp;diff=4173</id>
		<title>Talk:Lua:Interaction</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Talk:Lua:Interaction&amp;diff=4173"/>
		<updated>2007-12-13T05:07:52Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: New page: It would be nice to also Move these descriptions of the commands into their own pages (listed within: :Category:LUA Commands ) as well, i may start doing that myself soon. --~~~~&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It would be nice to also Move these descriptions of the commands into their own pages (listed within: [[:Category:LUA Commands]] ) as well, i may start doing that myself soon.&lt;br /&gt;
--[[User:Stevenm64-10860|Stevenm64-10860]] 23:07, 12 December 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Getting_Started&amp;diff=4172</id>
		<title>Lua:Getting Started</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Getting_Started&amp;diff=4172"/>
		<updated>2007-12-13T04:59:14Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Alright, because of the spotty knowledge about lua and how to get everything working correctly, I have put together this thread. It is divided into 4 parts:&lt;br /&gt;
&lt;br /&gt;
1. Setting up basic entities (spawns, resupply bags, etc.)&lt;br /&gt;
2. Setting up spawn turrets&lt;br /&gt;
3. Setting up locations&lt;br /&gt;
4. Setting up your gametype (teamplay or CTF)&lt;br /&gt;
&lt;br /&gt;
I am also assuming you have set up Hammer for FF (you can use FF textures, entities, etc).&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to have two things:&lt;br /&gt;
&lt;br /&gt;
 * your map, open in Hammer,&lt;br /&gt;
 * and a lua file, opened through a text editor. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t have a Lua file, create it with a text editor as &amp;#039;&amp;#039;mapname.lua&amp;#039;&amp;#039; (for example, &amp;#039;&amp;#039;ff_well.lua&amp;#039;&amp;#039;). This file should be in the same directory your BSP will be in (for the FF beta, it is &amp;#039;&amp;#039;SteamApps\SourceMods\ff_beta\maps\&amp;#039;&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;1. Basic Entities&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
You will probably want some basic FF entities for your map. These include Spawns, Resupply Bags, Armor, Health Kits and Grenade Bags. This section will teach you how to get all of these working in your map.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;1. Spawns.&amp;#039;&amp;#039;&lt;br /&gt;
To get spawn points working correctly, place info_ff_teamspawn point-based entities where you would like players to spawn.&lt;br /&gt;
Once you have these entities, enter a name for each one on each team. For example, all of the spawn points you want the Green team to spawn at would be named greenspawn. Spawn points for red would each be named redspawn, for blue bluespawn and for yellow yellowspawn.&lt;br /&gt;
It is important that when you name your entities, you make sure they are all lowercase. Hammer will try to automatically make the first letter uppercase, but the entities won&amp;#039;t work right. However you do it, make sure the text is all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Resupply Goodies&amp;#039;&amp;#039;&lt;br /&gt;
For the next four items (Resupply bags, Armor, Health, and Grenades) you start the same way: create a point-based info_ff_script entity. Place it where you want the goodie to be. Change its name to one of the following things to get it to become what you want. Again, it is important that when you name your entities, you make sure they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    a. Resupply bags&amp;#039;&amp;#039; - For the basic resupply bags, name them color_ammobackpack. For example, if I wanted resupply bags that only the Green team could use, I would name each one green_ammobackpack. The same rule applies for all of the other colors. If you want a pack anyone can use, name it ammobackpack.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    b. Armor Kits&amp;#039;&amp;#039; - For armor, name them color_armorkit. For example, if I wanted armor kits that only the Green team could use, I would name each one green_armorkit. The same rule applies for all four colors. If you want armor anyone can use, name it armorkit.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    c. Health Kits&amp;#039;&amp;#039; - For health kits, name them color_healthkit. For example, if I wanted health kits only the Green team could use, I would name each one green_healthkit. The same rule applies for all four colors. If you want a health kit anyone can use, name it healthkit.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    d. Grenade Packs&amp;#039;&amp;#039; - For back packs containing grenades, name them color_grenadebackpack. For example, if I wanted a grenade pack only the Green team could use, I would name them each green_grenadebackpack. This rule applies to all four colors. If you want a grenade pack anyone can use, name it grenadebackpack&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    e. Big Packs&amp;#039;&amp;#039; - For back packs containing everything but grenades, name them color_bigpack. For example, if I wanted a big pack only the Green team could use, I would name them each green_bigpack. This rule applies to all four colors. If you want a big pack anyone can use, name it bigpack&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;2. Spawn Turrets&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Spawn turrets are those pesky turrets that pop down when an enemy enters your spawn and kills them. They can only be on the ceiling. To get these to work, create a point-based ff_miniturret entity.&lt;br /&gt;
Depending on the team you want it to defend for, name it respawnturret_color. For example, if I want to put spawn turrets in the Green team&amp;#039;s spawn to shoot red, blue, or yellow team members who enter the green spawn, I would name them each respawnturret_green. The same rule applies for all four colors. Remember, it is important that when you name your entities, you make sure they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
Next, you open your map&amp;#039;s lua file (the second of the two files you need open), and enter this line of text on a blank line at the top:&lt;br /&gt;
IncludeScript(&amp;quot;base_respawnturret&amp;quot;);&lt;br /&gt;
This makes the turrets you created in Hammer work. Save your map&amp;#039;s lua file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;3. Locations&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Locations are those areas that appear on the bottom left of your screen, showing you where you are. When you build your map, you customize these locations by creating brush-based entities wherever players enter or exit each area. For example, if I have a map that is just two rooms with a doorway connecting them, I would want players who pass through the doorway to see that they are either in &amp;quot;North Room&amp;quot; or &amp;quot;South Room&amp;quot;.&lt;br /&gt;
I will teach you how to do this using this simple example, but the rule is the same for whether you have 1 entrance to your room, or 12 entrances.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;1. First,&amp;#039;&amp;#039; create a brush, and texture it with the orange trigger texture. Make sure it is large enough to completely cover the entrance to your location.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Second,&amp;#039;&amp;#039; turn that brush into a trigger_ff_script entity. Name it location_roomname. For example, if the name of the location I was identifying was &amp;quot;North Room&amp;quot;, I would name the trigger_ff_script location_northroom.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;3. Do the above&amp;#039;&amp;#039; two steps for each entrance to your room. Make sure they all have the same name, and be sure that when you name your entities, you they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;4. Now, open up&amp;#039;&amp;#039; your lua file again. Enter the following text on a new line near the top:&lt;br /&gt;
IncludeScript(&amp;quot;base_location&amp;quot;);&lt;br /&gt;
But we aren&amp;#039;t finished yet. Scroll down to the bottom of your lua file. We are going to enter new text.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;5. On a new line,&amp;#039;&amp;#039; we are going to tell FF the name we want the player to see for our location. Enter the following text:&lt;br /&gt;
location_northroom = location_info:new({ text = &amp;quot;North Room&amp;quot;, team = Team.kGreen })&lt;br /&gt;
Of course replace location_northroom with the name you gave your trigger_ff_script entities and replace &amp;quot;North Room&amp;quot; with whatever name you want players to see for your room. The last piece you need to check is at the end, where it says team = Team.kGreen. This is here because on my map, the north room belongs to the Green team. For your map, change this to correspond to whichever team controls the location (kRed, kYellow, or kBlue instead of kGreen). If it is neutral territory, change it to say team = NO_TEAM&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;6. Do the above&amp;#039;&amp;#039; steps for each of your locations, and it should work in game!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;4. Setting Up Your Gametype&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Thanks to the FF team implementing lua, there are nearly limitless gametypes we can create as mappers for FF. These instructions, however, will only show you how to set up two basic game types: teamplay and CTF.&lt;br /&gt;
&lt;br /&gt;
The setup for teamplay is relatively simple: At the top of your map&amp;#039;s lua file, add the following text:&lt;br /&gt;
IncludeScript(&amp;quot;base_teamplay&amp;quot;);&lt;br /&gt;
Wala! there you go. Save your lua file and you can do team deathmatch or what have you!&lt;br /&gt;
&lt;br /&gt;
For CTF, the set up takes a little more. It begins similarly, however.&lt;br /&gt;
&amp;#039;&amp;#039;1. At the top&amp;#039;&amp;#039; of your map&amp;#039;s lua file, add the following text:&lt;br /&gt;
IncludeScript(&amp;quot;base_ctf&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Next, you have to create&amp;#039;&amp;#039; the flag. Find the location where you want the flag, and create a point-based info_ff_script entity. Name it color_flag. For example, since the flag I am creating is for the Green team, I would name it green_flag. Again, be sure that when you name your entities, you they are all lowercase. The entity&amp;#039;s base will be the bottom point of the flag pole.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;3. Finally, we create&amp;#039;&amp;#039; the capture point. Find where you want the capture point to be, and create a brush that the player can walk into to capture the flag. Texture it with the orange trigger texture, and turn it into a trigger_ff_script entity. Now, name it color_cap, with the color corresponding to the team which captures the flag at that point. For example, I am creating a capture point where the green team brings enemy flags to score points. I would name my entity green_cap.&lt;br /&gt;
&lt;br /&gt;
And that is all! Save your map&amp;#039;s lua file, compile your map and load it up. All of the above features should work.&lt;br /&gt;
&lt;br /&gt;
[[Category:Mapping]]&lt;br /&gt;
[[Category:LUA]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category_talk:LUA&amp;diff=4171</id>
		<title>Category talk:LUA</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category_talk:LUA&amp;diff=4171"/>
		<updated>2007-12-13T04:57:36Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Moved misplaced article into its own page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Moved a page posted here into: [[FF Lua Getting Started]]&lt;br /&gt;
Talk pages are meant to be areas for people to discuss and talk about the attached pages not for posting articles/pages within. --[[User:Stevenm64-10860|Stevenm64-10860]] 22:57, 12 December 2007 (CST)&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Getting_Started&amp;diff=4170</id>
		<title>Lua:Getting Started</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Getting_Started&amp;diff=4170"/>
		<updated>2007-12-13T04:53:59Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Moved misplaced article to here (article originally by User: Imbrifer)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
Alright, because of the spotty knowledge about lua and how to get everything working correctly, I have put together this thread. It is divided into 4 parts:&lt;br /&gt;
&lt;br /&gt;
1. Setting up basic entities (spawns, resupply bags, etc.)&lt;br /&gt;
2. Setting up spawn turrets&lt;br /&gt;
3. Setting up locations&lt;br /&gt;
4. Setting up your gametype (teamplay or CTF)&lt;br /&gt;
&lt;br /&gt;
I am also assuming you have set up Hammer for FF (you can use FF textures, entities, etc).&lt;br /&gt;
&lt;br /&gt;
Before starting, you need to have two things:&lt;br /&gt;
&lt;br /&gt;
 * your map, open in Hammer,&lt;br /&gt;
 * and a lua file, opened through a text editor. &lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t have a Lua file, create it with a text editor as &amp;#039;&amp;#039;mapname.lua&amp;#039;&amp;#039; (for example, &amp;#039;&amp;#039;ff_well.lua&amp;#039;&amp;#039;). This file should be in the same directory your BSP will be in (for the FF beta, it is &amp;#039;&amp;#039;SteamApps\SourceMods\ff_beta\maps\&amp;#039;&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;1. Basic Entities&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
You will probably want some basic FF entities for your map. These include Spawns, Resupply Bags, Armor, Health Kits and Grenade Bags. This section will teach you how to get all of these working in your map.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;1. Spawns.&amp;#039;&amp;#039;&lt;br /&gt;
To get spawn points working correctly, place info_ff_teamspawn point-based entities where you would like players to spawn.&lt;br /&gt;
Once you have these entities, enter a name for each one on each team. For example, all of the spawn points you want the Green team to spawn at would be named greenspawn. Spawn points for red would each be named redspawn, for blue bluespawn and for yellow yellowspawn.&lt;br /&gt;
It is important that when you name your entities, you make sure they are all lowercase. Hammer will try to automatically make the first letter uppercase, but the entities won&amp;#039;t work right. However you do it, make sure the text is all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Resupply Goodies&amp;#039;&amp;#039;&lt;br /&gt;
For the next four items (Resupply bags, Armor, Health, and Grenades) you start the same way: create a point-based info_ff_script entity. Place it where you want the goodie to be. Change its name to one of the following things to get it to become what you want. Again, it is important that when you name your entities, you make sure they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    a. Resupply bags&amp;#039;&amp;#039; - For the basic resupply bags, name them color_ammobackpack. For example, if I wanted resupply bags that only the Green team could use, I would name each one green_ammobackpack. The same rule applies for all of the other colors. If you want a pack anyone can use, name it ammobackpack.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    b. Armor Kits&amp;#039;&amp;#039; - For armor, name them color_armorkit. For example, if I wanted armor kits that only the Green team could use, I would name each one green_armorkit. The same rule applies for all four colors. If you want armor anyone can use, name it armorkit.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    c. Health Kits&amp;#039;&amp;#039; - For health kits, name them color_healthkit. For example, if I wanted health kits only the Green team could use, I would name each one green_healthkit. The same rule applies for all four colors. If you want a health kit anyone can use, name it healthkit.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    d. Grenade Packs&amp;#039;&amp;#039; - For back packs containing grenades, name them color_grenadebackpack. For example, if I wanted a grenade pack only the Green team could use, I would name them each green_grenadebackpack. This rule applies to all four colors. If you want a grenade pack anyone can use, name it grenadebackpack&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;    e. Big Packs&amp;#039;&amp;#039; - For back packs containing everything but grenades, name them color_bigpack. For example, if I wanted a big pack only the Green team could use, I would name them each green_bigpack. This rule applies to all four colors. If you want a big pack anyone can use, name it bigpack&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;2. Spawn Turrets&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Spawn turrets are those pesky turrets that pop down when an enemy enters your spawn and kills them. They can only be on the ceiling. To get these to work, create a point-based ff_miniturret entity.&lt;br /&gt;
Depending on the team you want it to defend for, name it respawnturret_color. For example, if I want to put spawn turrets in the Green team&amp;#039;s spawn to shoot red, blue, or yellow team members who enter the green spawn, I would name them each respawnturret_green. The same rule applies for all four colors. Remember, it is important that when you name your entities, you make sure they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
Next, you open your map&amp;#039;s lua file (the second of the two files you need open), and enter this line of text on a blank line at the top:&lt;br /&gt;
IncludeScript(&amp;quot;base_respawnturret&amp;quot;);&lt;br /&gt;
This makes the turrets you created in Hammer work. Save your map&amp;#039;s lua file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;3. Locations&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Locations are those areas that appear on the bottom left of your screen, showing you where you are. When you build your map, you customize these locations by creating brush-based entities wherever players enter or exit each area. For example, if I have a map that is just two rooms with a doorway connecting them, I would want players who pass through the doorway to see that they are either in &amp;quot;North Room&amp;quot; or &amp;quot;South Room&amp;quot;.&lt;br /&gt;
I will teach you how to do this using this simple example, but the rule is the same for whether you have 1 entrance to your room, or 12 entrances.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;1. First,&amp;#039;&amp;#039; create a brush, and texture it with the orange trigger texture. Make sure it is large enough to completely cover the entrance to your location.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Second,&amp;#039;&amp;#039; turn that brush into a trigger_ff_script entity. Name it location_roomname. For example, if the name of the location I was identifying was &amp;quot;North Room&amp;quot;, I would name the trigger_ff_script location_northroom.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;3. Do the above&amp;#039;&amp;#039; two steps for each entrance to your room. Make sure they all have the same name, and be sure that when you name your entities, you they are all lowercase.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;4. Now, open up&amp;#039;&amp;#039; your lua file again. Enter the following text on a new line near the top:&lt;br /&gt;
IncludeScript(&amp;quot;base_location&amp;quot;);&lt;br /&gt;
But we aren&amp;#039;t finished yet. Scroll down to the bottom of your lua file. We are going to enter new text.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;5. On a new line,&amp;#039;&amp;#039; we are going to tell FF the name we want the player to see for our location. Enter the following text:&lt;br /&gt;
location_northroom = location_info:new({ text = &amp;quot;North Room&amp;quot;, team = Team.kGreen })&lt;br /&gt;
Of course replace location_northroom with the name you gave your trigger_ff_script entities and replace &amp;quot;North Room&amp;quot; with whatever name you want players to see for your room. The last piece you need to check is at the end, where it says team = Team.kGreen. This is here because on my map, the north room belongs to the Green team. For your map, change this to correspond to whichever team controls the location (kRed, kYellow, or kBlue instead of kGreen). If it is neutral territory, change it to say team = NO_TEAM&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;6. Do the above&amp;#039;&amp;#039; steps for each of your locations, and it should work in game!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;4. Setting Up Your Gametype&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
Thanks to the FF team implementing lua, there are nearly limitless gametypes we can create as mappers for FF. These instructions, however, will only show you how to set up two basic game types: teamplay and CTF.&lt;br /&gt;
&lt;br /&gt;
The setup for teamplay is relatively simple: At the top of your map&amp;#039;s lua file, add the following text:&lt;br /&gt;
IncludeScript(&amp;quot;base_teamplay&amp;quot;);&lt;br /&gt;
Wala! there you go. Save your lua file and you can do team deathmatch or what have you!&lt;br /&gt;
&lt;br /&gt;
For CTF, the set up takes a little more. It begins similarly, however.&lt;br /&gt;
&amp;#039;&amp;#039;1. At the top&amp;#039;&amp;#039; of your map&amp;#039;s lua file, add the following text:&lt;br /&gt;
IncludeScript(&amp;quot;base_ctf&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;2. Next, you have to create&amp;#039;&amp;#039; the flag. Find the location where you want the flag, and create a point-based info_ff_script entity. Name it color_flag. For example, since the flag I am creating is for the Green team, I would name it green_flag. Again, be sure that when you name your entities, you they are all lowercase. The entity&amp;#039;s base will be the bottom point of the flag pole.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;3. Finally, we create&amp;#039;&amp;#039; the capture point. Find where you want the capture point to be, and create a brush that the player can walk into to capture the flag. Texture it with the orange trigger texture, and turn it into a trigger_ff_script entity. Now, name it color_cap, with the color corresponding to the team which captures the flag at that point. For example, I am creating a capture point where the green team brings enemy flags to score points. I would name my entity green_cap.&lt;br /&gt;
&lt;br /&gt;
And that is all! Save your map&amp;#039;s lua file, compile your map and load it up. All of the above features should work.&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4167</id>
		<title>Lua Commands</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua_Commands&amp;diff=4167"/>
		<updated>2007-12-13T04:22:20Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Redirecting to Category:LUA Commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Category:LUA_Commands]]&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4126</id>
		<title>Lua:SetTeamName</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4126"/>
		<updated>2007-12-02T11:26:36Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: another misnamed item&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamName==&lt;br /&gt;
&lt;br /&gt;
SetTeamName is used to set the name of a team in game (instead of just &amp;quot;Red Team&amp;quot;, or &amp;quot;Blue Team&amp;quot;). It must be placed in your map&amp;#039;s startup() function and gets passed 2 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamName( team, name )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team - team to set limits on&lt;br /&gt;
name - [a string] the name of the team (like &amp;quot;Attackers&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red team be called &amp;quot;Flag Hoppers&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- Make red team&amp;#039;s name be &amp;quot;Flag Hoppers&amp;quot;&lt;br /&gt;
     SetTeamName( RED_TEAM, &amp;quot;Flag Hoppers&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4125</id>
		<title>Lua:SetTeamName</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4125"/>
		<updated>2007-12-02T11:25:48Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: Misnamed item&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamName==&lt;br /&gt;
&lt;br /&gt;
SetTeamClassName is used to set the name of a team in game (instead of just &amp;quot;Red Team&amp;quot;, or &amp;quot;Blue Team&amp;quot;). It must be placed in your map&amp;#039;s startup() function and gets passed 2 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamName( team, name )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team - team to set limits on&lt;br /&gt;
name - [a string] the name of the team (like &amp;quot;Attackers&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red team be called &amp;quot;Flag Hoppers&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- Make red team&amp;#039;s name be &amp;quot;Flag Hoppers&amp;quot;&lt;br /&gt;
     SetTeamName( RED_TEAM, &amp;quot;Flag Hoppers&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4123</id>
		<title>Lua:IsGrenInNoGren</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenInNoGren&amp;diff=4123"/>
		<updated>2007-12-02T11:16:40Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:IsGrenInNoGren moved to IsGrenInNoGren&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsGrenInNoGren==&lt;br /&gt;
&lt;br /&gt;
IsGrenInNoGren is used to see if a grenade is in a &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; area. By default, a trigger_ff_script named &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; will not allow grenades to explode while the grenade is touching the &amp;quot;nogrens&amp;quot; trigger_ff_script entity.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsGrenInNoGren( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a grenade and then if the grenade is in a &amp;quot;[[:LUA:nogrens|nogrens]]&amp;quot; area or not. A list of grenades can be found [[:Category:Grenades|here]].&lt;br /&gt;
&lt;br /&gt;
==Important Note==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you want trigger&amp;#039;s to react to grenades you MUST &amp;#039;check&amp;#039;/&amp;#039;tick&amp;#039; the &amp;quot;everything&amp;quot; option on the flags tab of the entity in Hammer.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://mulchman.trepid.net/tick-everything.JPG&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayer&amp;diff=4121</id>
		<title>Lua:IsPlayer</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayer&amp;diff=4121"/>
		<updated>2007-12-02T11:16:25Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:IsPlayer moved to IsPlayer: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsPlayer==&lt;br /&gt;
&lt;br /&gt;
IsPlayer is used to see if an entity index being passed into a function is a player or not.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsPlayer( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a player or not.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Here&amp;#039;s an example of seeing if someone touching a trigger_ff_script named &amp;quot;red_goal&amp;quot; is a player or not and then giving that players team a point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-- In the map&amp;#039;s .LUA file...&lt;br /&gt;
&lt;br /&gt;
-- Define red_goal trigger_ff_script&lt;br /&gt;
red_goal = trigger_ff_script:new({})&lt;br /&gt;
&lt;br /&gt;
-- When we&amp;#039;re touched by a player, do something&lt;br /&gt;
function red_goal:ontouch( ent_id )&lt;br /&gt;
     if IsPlayer( ent_id ) then&lt;br /&gt;
          -- Add 1 point to the players team&lt;br /&gt;
          AddTeamScore( GetPlayerTeam( ent_id ), 1 )&lt;br /&gt;
     end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4119</id>
		<title>Lua:SetTeamName</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamName&amp;diff=4119"/>
		<updated>2007-12-02T11:14:46Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:SetTeamName moved to SetTeamName: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamName==&lt;br /&gt;
&lt;br /&gt;
SetTeamClassName is used to set the name of a team in game (instead of just &amp;quot;Red Team&amp;quot;, or &amp;quot;Blue Team&amp;quot;). It must be placed in your map&amp;#039;s startup() function and gets passed 2 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamClassLimit( team, name )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team - team to set limits on&lt;br /&gt;
name - [a string] the name of the team (like &amp;quot;Attackers&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red team be called &amp;quot;Flag Hoppers&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- Make red team&amp;#039;s name be &amp;quot;Flag Hoppers&amp;quot;&lt;br /&gt;
     SetTeamName( RED_TEAM, &amp;quot;Flag Hoppers&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SmartClassLimits&amp;diff=4117</id>
		<title>Lua:SmartClassLimits</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SmartClassLimits&amp;diff=4117"/>
		<updated>2007-12-02T11:14:34Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:SmartClassLimits moved to SmartClassLimits: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SmartClassLimits==&lt;br /&gt;
&lt;br /&gt;
SmartClassLimits is a way of simplifying SetTeamClassLimits. It must be placed in your map&amp;#039;s startup() function and gets passed 11 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SmartClassLimits( team, scout, sniper, soldier, demoman, medic, hwguy, pyro, spy, engineer, civilian )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team     - team to set limits on&lt;br /&gt;
scout    - number of scouts allowed&lt;br /&gt;
sniper   - number of snipers allowed&lt;br /&gt;
soldier  - number of soldiers allowed&lt;br /&gt;
demoman  - number of demomen allowed&lt;br /&gt;
medic    - number of medics allowed&lt;br /&gt;
hwguy    - number of hwguys allowed&lt;br /&gt;
pyro     - number of pyros allowed&lt;br /&gt;
spy      - number of spies allowed&lt;br /&gt;
engineer - number of engineers allowed&lt;br /&gt;
civilian - number of civilians allowed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red only have 2 snipers and blue not have any soldiers, plus eliminate the ability to have civilians on any team:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- Limit red to 2 snipers (and eliminate red civilians)&lt;br /&gt;
     SmartClassLimits( RED_TEAM, 0, 2, 0, 0, 0, 0, 0, 0, 0, -1 )&lt;br /&gt;
&lt;br /&gt;
     -- Remove soldiers from blue team (and eliminate blue civilians)&lt;br /&gt;
     SmartClassLimits( BLUE_TEAM, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1 )&lt;br /&gt;
&lt;br /&gt;
     -- Remove yellow civilians&lt;br /&gt;
     SmartClassLimits( YELLOW_TEAM, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 )&lt;br /&gt;
&lt;br /&gt;
     -- Remove green civilians&lt;br /&gt;
     SmartClassLimits( GREEN_TEAM, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamPlayerLimit&amp;diff=4115</id>
		<title>Lua:SetTeamPlayerLimit</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamPlayerLimit&amp;diff=4115"/>
		<updated>2007-12-02T11:14:29Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:SetTeamPlayerLimit moved to SetTeamPlayerLimit: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamPlayerLimit==&lt;br /&gt;
&lt;br /&gt;
SetTeamPlayerLimit is used to set what teams are allowed. It must be placed in your map&amp;#039;s startup() function and gets passed 2 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamPlayerLimit( team, limit )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team  - team to set limits on&lt;br /&gt;
limit - allowed or not (0 = allowed, -1 = not allowed)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red and blue be the only allowed teams:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- set up team limits (only red &amp;amp; blue)&lt;br /&gt;
     SetTeamPlayerLimit( BLUE_TEAM, 0 )&lt;br /&gt;
     SetTeamPlayerLimit( RED_TEAM, 0 )&lt;br /&gt;
     SetTeamPlayerLimit( YELLOW_TEAM, -1 )&lt;br /&gt;
     SetTeamPlayerLimit( GREEN_TEAM, -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamClassLimit&amp;diff=4113</id>
		<title>Lua:SetTeamClassLimit</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamClassLimit&amp;diff=4113"/>
		<updated>2007-12-02T11:13:28Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:SetTeamClassLimit moved to SetTeamClassLimit: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamClassLimit==&lt;br /&gt;
&lt;br /&gt;
SetTeamClassLimit is used to set the class limits for a team. This means telling a team which classes are allowed as well as the number of that class allowed. It must be placed in your map&amp;#039;s startup() function and gets passed 3 parameters:&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamClassLimit( team, class, limit )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
team  - team to set limits on&lt;br /&gt;
class - class to set a limit on&lt;br /&gt;
limit - how many are allowed (0 = infinite, -1 = none)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, we will make red only have 2 snipers and blue not have any soldiers:&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     -- Limit red to 2 snipers&lt;br /&gt;
     SetTeamClassLimit( RED_TEAM, CLASS_SNIPER, 2 )&lt;br /&gt;
&lt;br /&gt;
     -- Remove soldiers from blue team&lt;br /&gt;
     SetTeamClassLimit( BLUE_TEAM, CLASS_SOLDIER, -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every other class will be allowed an infinite number of players.&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamAllies&amp;diff=4111</id>
		<title>Lua:SetTeamAllies</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:SetTeamAllies&amp;diff=4111"/>
		<updated>2007-12-02T11:13:02Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:SetTeamAllies moved to SetTeamAllies: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SetTeamAllies==&lt;br /&gt;
&lt;br /&gt;
SetTeamAllies is used to ally one team to another.&lt;br /&gt;
&lt;br /&gt;
The SetTeamAllies function only works within a .lua files startup() section. This startup() function&lt;br /&gt;
can be added to any .lua file but there should be only one within a .lua file.&lt;br /&gt;
&lt;br /&gt;
===Example .LUA startup() function===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
     SetTeamAllies( BLUE_TEAM, 16 );&lt;br /&gt;
     SetTeamAllies( YELLOW_TEAM, 4 );&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, the first parameter in SetTeamAllies is the team that&amp;#039;s going to be given an ally. The second command is (for now) a bit field of the team who is going to be the ally.&lt;br /&gt;
&lt;br /&gt;
===Setting blue team to have an ally of yellow team===&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamAllies( BLUE_TEAM, 16 );&amp;lt;/pre&amp;gt;&lt;br /&gt;
This tells BLUE TEAM to have an ally of YELLOW TEAM.&lt;br /&gt;
&lt;br /&gt;
===Setting yellow team to have an ally of blue team===&lt;br /&gt;
&amp;lt;pre&amp;gt;SetTeamAllies( YELLOW_TEAM, 4 );&amp;lt;/pre&amp;gt;&lt;br /&gt;
Similarly, this tells YELLOW TEAM to have an ally of BLUE TEAM.&lt;br /&gt;
&lt;br /&gt;
Listing of teams as their &amp;#039;bitfield&amp;#039; value:&lt;br /&gt;
===Team &amp;#039;bitfield&amp;#039; values===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
blue team:   4&lt;br /&gt;
red team:    8&lt;br /&gt;
yellow team: 16&lt;br /&gt;
green team:  32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayerInNoBuild&amp;diff=4109</id>
		<title>Lua:IsPlayerInNoBuild</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsPlayerInNoBuild&amp;diff=4109"/>
		<updated>2007-12-02T11:12:36Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:IsPlayerInNoBuild moved to IsPlayerInNoBuild: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsPlayerInNoBuild==&lt;br /&gt;
&lt;br /&gt;
IsPlayerInNoBuild is used to see if a player is in a &amp;quot;[[:LUA:nobuild|nobuild]]&amp;quot; area. By default, a trigger_ff_script named &amp;quot;[[:LUA:nobuild|nobuild]]&amp;quot; will not allow players to build while the player is touching the &amp;quot;nobuild&amp;quot; trigger_ff_script entity.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsPlayerInNoBuild( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a player and then if the player is in a &amp;quot;[[:LUA:nobuild|nobuild]]&amp;quot; area or not.&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenade&amp;diff=4107</id>
		<title>Lua:IsGrenade</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:IsGrenade&amp;diff=4107"/>
		<updated>2007-12-02T11:12:19Z</updated>

		<summary type="html">&lt;p&gt;Stevenm64-10860: LUA:IsGrenade moved to IsGrenade: LUA: prefix not needed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==IsGrenade==&lt;br /&gt;
&lt;br /&gt;
IsGrenade is used to see if an entity index being passed into a function is a grenade or not.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;IsGrenade( ent_id )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
The ent_id passed in is simply an integer index that refers to an entities game code ENTINDEX().&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
The output is true or false depending if ent_id is a grenade or not. A list of grenades can be found [[:Category:Grenades|here]].&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Here&amp;#039;s an example of giving a team a point whenever a grenade touches a trigger_ff_script named &amp;quot;red_goal&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-- In the map&amp;#039;s .LUA file...&lt;br /&gt;
&lt;br /&gt;
-- Define red_goal trigger_ff_script&lt;br /&gt;
red_goal = trigger_ff_script:new({})&lt;br /&gt;
&lt;br /&gt;
-- When we&amp;#039;re touched by a grenade, give the grenade owners team a point&lt;br /&gt;
function red_goal:ontouch( ent_id )&lt;br /&gt;
     if IsGrenade( ent_id ) then&lt;br /&gt;
          -- Add 1 point to the grenade owners team&lt;br /&gt;
          AddTeamScore( GetObjectsTeam( ent_id ), 1 )&lt;br /&gt;
     end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Important Note==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you want trigger&amp;#039;s to react to grenades you MUST &amp;#039;check&amp;#039;/&amp;#039;tick&amp;#039; the &amp;quot;everything&amp;quot; option on the flags tab of the entity in Hammer.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
http://mulchman.trepid.net/tick-everything.JPG&lt;br /&gt;
&lt;br /&gt;
[[Category:LUA_Commands]]&lt;/div&gt;</summary>
		<author><name>Stevenm64-10860</name></author>
	</entry>
</feed>