<?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=R00Kie</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=R00Kie"/>
	<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Special:Contributions/R00Kie"/>
	<updated>2026-08-08T12:36:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.11</generator>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:AddHudText&amp;diff=10221</id>
		<title>Lua:AddHudText</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:AddHudText&amp;diff=10221"/>
		<updated>2021-04-16T04:08:22Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Input */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
==AddHudText==&lt;br /&gt;
&lt;br /&gt;
Puts a text object on a player&amp;#039;s screen.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;pre&amp;gt;AddHudText(player, text_id, text, a, b, c, d)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Input===&lt;br /&gt;
* player(CFFPlayer) The player receiving the text&lt;br /&gt;
* text_id(string) the name of this text (so we can remove it later)&lt;br /&gt;
* text(string) The text to display&lt;br /&gt;
* a(integer) x position&lt;br /&gt;
* b(integer) y position&lt;br /&gt;
* c(integer) horizontal alignment&lt;br /&gt;
* d(integer) vertical alignment&lt;br /&gt;
&lt;br /&gt;
===Output===&lt;br /&gt;
Returns: nothing&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;pre&amp;gt;local player = CastToPlayer( player_entity )&lt;br /&gt;
AddHudText( player, &amp;quot;hunted_location&amp;quot;, &amp;quot;Hunted Location: &amp;quot; .. player_hunted:GetLocation(), 4, 44, 0, 1 )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HUD_Items]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:HUD_Items&amp;diff=10220</id>
		<title>Category:HUD Items</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:HUD_Items&amp;diff=10220"/>
		<updated>2017-07-12T11:21:41Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
HUD items are visuals you can stick up on the player&amp;#039;s screen through Lua. We use them for showing the player flag status and other useful information.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudIcon|AddHudIcon]]( player, HudIconType, NameOfHudIcon, X, Y, Width, Height, Align ) || adds HUD icon to given player of given type. Name is generally taken from the flag entity to apply the right kind. X, Y, W, H, and A are all standard.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudIconToAll|AddHudIconToAll]]( HudIconType, NameOfHudUcon, X, Y, W, H, A ) || adds HUD icon to all players like those used for flag info.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudText|AddHudText]] || Puts a bit of text on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTextToAll|AddHudTextToAll]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimer|AddHudTimer]] || Puts a countdown timer on the screen of one player.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimerToTeam|AddHudTimerToTeam]] || Puts a countdown timer on the screen of players on a specified team.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimerToAll|AddHudTimerToAll]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBox]](player, identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBoxToTeam]](team, identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBoxToAll]](identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||Adds a hud box to the screen. Color and border are set with CustomColor(r, g, b, a) and CustomBorder(CustomColor(), width)&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:RemoveHudItem|RemoveHudItem]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:RemoveHudItemFromAll|RemoveHudItemFromAll]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additionally, see [[Lua:Timer]] for a more useful way to control HUD timers.&lt;br /&gt;
[[Category:Lua_Commands]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:HUD_Items&amp;diff=10219</id>
		<title>Category:HUD Items</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:HUD_Items&amp;diff=10219"/>
		<updated>2017-07-12T11:20:28Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
HUD items are visuals you can stick up on the player&amp;#039;s screen through Lua. We use them for showing the player flag status and other useful information.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudIcon|AddHudIcon]]( player, HudIconType, NameOfHudIcon, X, Y, Width, Height, Align ) || adds HUD icon to given player of given type. Name is generally taken from the flag entity to apply the right kind. X, Y, W, H, and A are all standard.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudIconToAll|AddHudIconToAll]]( HudIconType, NameOfHudUcon, X, Y, W, H, A ) || adds HUD icon to all players like those used for flag info.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudText|AddHudText]] || Puts a bit of text on the screen.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTextToAll|AddHudTextToAll]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimer|AddHudTimer]] || Puts a countdown timer on the screen of one player.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimerToTeam|AddHudTimerToTeam]] || Puts a countdown timer on the screen of players on a specified team.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:AddHudTimerToAll|AddHudTimerToAll]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBox]](player, identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBoxToTeam]](team, identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||&lt;br /&gt;
|-&lt;br /&gt;
| [[AddHudBoxToAll]](identifier, x, y, width, height, CustomColor, CustomBorder, xalign, yalign ) ||Adds a hud box to the screen color and border are set with CustomColor(r, g, b, a) and CustomBorder(CustomColor(), width)&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:RemoveHudItem|RemoveHudItem]] ||&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:RemoveHudItemFromAll|RemoveHudItemFromAll]] ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Additionally, see [[Lua:Timer]] for a more useful way to control HUD timers.&lt;br /&gt;
[[Category:Lua_Commands]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10218</id>
		<title>Category:Global Callbacks</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10218"/>
		<updated>2017-07-04T09:39:10Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* A short list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox mapping}}&lt;br /&gt;
These are Callbacks which are not connected with any game entity. Declare the function in your lua script, and the game will run it at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
	-- set up team limits&lt;br /&gt;
	local team = GetTeam( Team.kBlue )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kRed )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kYellow )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kGreen )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A short list==&lt;br /&gt;
This list needs a LOT of work!&lt;br /&gt;
*[[Lua:Effect-triggered callbacks]]&lt;br /&gt;
*[[Lua:Flaginfo]]&lt;br /&gt;
*[[Lua:Startup]]&lt;br /&gt;
*[[Lua:shutdown]]() Calls right before map change.&lt;br /&gt;
*[[Lua:Tick]]&lt;br /&gt;
*[[buildable_killed]] ( buildable, damageinfo )&lt;br /&gt;
*[[Lua:player killed]]&lt;br /&gt;
*[[Lua:player ondamage]]&lt;br /&gt;
*[[Lua:player spawn]]&lt;br /&gt;
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others&lt;br /&gt;
*[[Lua:precache]]&lt;br /&gt;
*[[Player onkill]]&lt;br /&gt;
*[[Player switchteam]]&lt;br /&gt;
*[[player_onthrowgren1]]&lt;br /&gt;
*[[player_onthrowgren2]]&lt;br /&gt;
*[[player_onuse]] ( player )&lt;br /&gt;
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.&lt;br /&gt;
*[[player_connected]]( player ) Called when a player successfully joins the server&lt;br /&gt;
*[[player_disconnected]]( player )&lt;br /&gt;
*[[Category:Lua]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_throwgren2&amp;diff=10217</id>
		<title>Player throwgren2</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_throwgren2&amp;diff=10217"/>
		<updated>2017-07-04T09:38:31Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: R00Kie moved page Player throwgren2 to Player onthrowgren2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Player onthrowgren2]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren2&amp;diff=10216</id>
		<title>Player onthrowgren2</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren2&amp;diff=10216"/>
		<updated>2017-07-04T09:38:31Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: R00Kie moved page Player throwgren2 to Player onthrowgren2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
==player_onthrowgren2( player, time )==&lt;br /&gt;
This function is called whenever a player throws a secondary grenade. Return true or false to allow/disallow the throw.&lt;br /&gt;
===Inputs===&lt;br /&gt;
player(CFFPlayer) The player trying to throw the grenade&lt;br /&gt;
time(float) The time, in seconds, since the grenade was primed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;function player_onthrowgren2( player, time )&lt;br /&gt;
	if time &amp;lt; .5 then&lt;br /&gt;
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )&lt;br /&gt;
		BroadcastMessageToPlayer(player, &amp;quot;Stop spamming!&amp;quot;)&lt;br /&gt;
		return EVENT_DISALLOWED&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Callbacks]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren2&amp;diff=10215</id>
		<title>Player onthrowgren2</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren2&amp;diff=10215"/>
		<updated>2017-07-04T09:38:13Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
==player_onthrowgren2( player, time )==&lt;br /&gt;
This function is called whenever a player throws a secondary grenade. Return true or false to allow/disallow the throw.&lt;br /&gt;
===Inputs===&lt;br /&gt;
player(CFFPlayer) The player trying to throw the grenade&lt;br /&gt;
time(float) The time, in seconds, since the grenade was primed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;function player_onthrowgren2( player, time )&lt;br /&gt;
	if time &amp;lt; .5 then&lt;br /&gt;
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )&lt;br /&gt;
		BroadcastMessageToPlayer(player, &amp;quot;Stop spamming!&amp;quot;)&lt;br /&gt;
		return EVENT_DISALLOWED&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Callbacks]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10214</id>
		<title>Category:Global Callbacks</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10214"/>
		<updated>2017-07-04T09:29:08Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* A short list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox mapping}}&lt;br /&gt;
These are Callbacks which are not connected with any game entity. Declare the function in your lua script, and the game will run it at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
	-- set up team limits&lt;br /&gt;
	local team = GetTeam( Team.kBlue )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kRed )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kYellow )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kGreen )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A short list==&lt;br /&gt;
This list needs a LOT of work!&lt;br /&gt;
*[[Lua:Effect-triggered callbacks]]&lt;br /&gt;
*[[Lua:Flaginfo]]&lt;br /&gt;
*[[Lua:Startup]]&lt;br /&gt;
*[[Lua:shutdown]]() Calls right before map change.&lt;br /&gt;
*[[Lua:Tick]]&lt;br /&gt;
*[[buildable_killed]] ( buildable, damageinfo )&lt;br /&gt;
*[[Lua:player killed]]&lt;br /&gt;
*[[Lua:player ondamage]]&lt;br /&gt;
*[[Lua:player spawn]]&lt;br /&gt;
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others&lt;br /&gt;
*[[Lua:precache]]&lt;br /&gt;
*[[Player onkill]]&lt;br /&gt;
*[[Player switchteam]]&lt;br /&gt;
*[[player_onthrowgren1]]&lt;br /&gt;
*[[Player_onthrowgren2]]&lt;br /&gt;
*[[player_onuse]] ( player )&lt;br /&gt;
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.&lt;br /&gt;
*[[player_connected]]( player ) Called when a player successfully joins the server&lt;br /&gt;
*[[player_disconnected]]( player )&lt;br /&gt;
*[[Category:Lua]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_throwgren1&amp;diff=10213</id>
		<title>Player throwgren1</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_throwgren1&amp;diff=10213"/>
		<updated>2017-07-04T08:38:20Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: R00Kie moved page Player throwgren1 to Player onthrowgren1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Player onthrowgren1]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren1&amp;diff=10212</id>
		<title>Player onthrowgren1</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren1&amp;diff=10212"/>
		<updated>2017-07-04T08:38:20Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: R00Kie moved page Player throwgren1 to Player onthrowgren1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
==player_onthrowgren1( player, primetime )==&lt;br /&gt;
This function is called whenever a player throws a frag grenade. Return true or false to allow/disallow the throw.&lt;br /&gt;
===Inputs===&lt;br /&gt;
player(CFFPlayer) The player trying to throw the grenade.&lt;br /&gt;
time(float) The time, in seconds, since the grenade was primed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;function player_onthrowgren1( player, time )&lt;br /&gt;
	if time &amp;lt; .5 then&lt;br /&gt;
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )&lt;br /&gt;
		BroadcastMessageToPlayer(player, &amp;quot;Stop spamming!&amp;quot;)&lt;br /&gt;
		return EVENT_DISALLOWED&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Callbacks]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren1&amp;diff=10211</id>
		<title>Player onthrowgren1</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Player_onthrowgren1&amp;diff=10211"/>
		<updated>2017-07-04T08:36:47Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* player_onthrowgren1( player, primetime ) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
==player_onthrowgren1( player, primetime )==&lt;br /&gt;
This function is called whenever a player throws a frag grenade. Return true or false to allow/disallow the throw.&lt;br /&gt;
===Inputs===&lt;br /&gt;
player(CFFPlayer) The player trying to throw the grenade.&lt;br /&gt;
time(float) The time, in seconds, since the grenade was primed.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&amp;lt;pre&amp;gt;function player_onthrowgren1( player, time )&lt;br /&gt;
	if time &amp;lt; .5 then&lt;br /&gt;
		ApplyToPlayer( player, {AT.kStopPrimedGrens} )&lt;br /&gt;
		BroadcastMessageToPlayer(player, &amp;quot;Stop spamming!&amp;quot;)&lt;br /&gt;
		return EVENT_DISALLOWED&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua Callbacks]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10210</id>
		<title>Category:Global Callbacks</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10210"/>
		<updated>2017-07-04T08:35:48Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* A short list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox mapping}}&lt;br /&gt;
These are Callbacks which are not connected with any game entity. Declare the function in your lua script, and the game will run it at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
	-- set up team limits&lt;br /&gt;
	local team = GetTeam( Team.kBlue )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kRed )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kYellow )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kGreen )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A short list==&lt;br /&gt;
This list needs a LOT of work!&lt;br /&gt;
*[[Lua:Effect-triggered callbacks]]&lt;br /&gt;
*[[Lua:Flaginfo]]&lt;br /&gt;
*[[Lua:Startup]]&lt;br /&gt;
*[[Lua:shutdown]]() Calls right before map change.&lt;br /&gt;
*[[Lua:Tick]]&lt;br /&gt;
*[[buildable_killed]] ( buildable, damageinfo )&lt;br /&gt;
*[[Lua:player killed]]&lt;br /&gt;
*[[Lua:player ondamage]]&lt;br /&gt;
*[[Lua:player spawn]]&lt;br /&gt;
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others&lt;br /&gt;
*[[Lua:precache]]&lt;br /&gt;
*[[Player onkill]]&lt;br /&gt;
*[[Player switchteam]]&lt;br /&gt;
*[[player throwgren1]]&lt;br /&gt;
*[[Player throwgren2]]&lt;br /&gt;
*[[player_onuse]] ( player )&lt;br /&gt;
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.&lt;br /&gt;
*[[player_connected]]( player ) Called when a player successfully joins the server&lt;br /&gt;
*[[player_disconnected]]( player )&lt;br /&gt;
*[[Category:Lua]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10209</id>
		<title>Category:Global Callbacks</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10209"/>
		<updated>2017-07-04T08:35:01Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* A short list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox mapping}}&lt;br /&gt;
These are Callbacks which are not connected with any game entity. Declare the function in your lua script, and the game will run it at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
	-- set up team limits&lt;br /&gt;
	local team = GetTeam( Team.kBlue )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kRed )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kYellow )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kGreen )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A short list==&lt;br /&gt;
This list needs a LOT of work!&lt;br /&gt;
*[[Lua:Effect-triggered callbacks]]&lt;br /&gt;
*[[Lua:Flaginfo]]&lt;br /&gt;
*[[Lua:Startup]]&lt;br /&gt;
*[[Lua:shutdown]]() Calls right before map change.&lt;br /&gt;
*[[Lua:Tick]]&lt;br /&gt;
*[[buildable_killed]] ( buildable, damageinfo )&lt;br /&gt;
*[[Lua:player killed]]&lt;br /&gt;
*[[Lua:player ondamage]]&lt;br /&gt;
*[[Lua:player spawn]]&lt;br /&gt;
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others&lt;br /&gt;
*[[Lua:precache]]&lt;br /&gt;
*[[Player onkill]]&lt;br /&gt;
*[[Player switchteam]]&lt;br /&gt;
*[[player_onthrowgren1]]&lt;br /&gt;
*[[Player throwgren2]]&lt;br /&gt;
*[[player_onuse]] ( player )&lt;br /&gt;
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.&lt;br /&gt;
*[[player_connected]]( player ) Called when a player successfully joins the server&lt;br /&gt;
*[[player_disconnected]]( player )&lt;br /&gt;
*[[Category:Lua]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Player_functions&amp;diff=10208</id>
		<title>Category:Player functions</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Player_functions&amp;diff=10208"/>
		<updated>2017-05-31T07:49:14Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
Any player that&amp;#039;s connected to the server can be accessed by the lua system. Once you have identified a specific player object you can use these functions to affect the player or get information about it.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
CFFPlayer:&amp;#039;&amp;#039;&amp;#039;function&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;parameters&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;pre&amp;gt;function location_info:ontouch( touch_entity )&lt;br /&gt;
&lt;br /&gt;
	-- set the location of the player&lt;br /&gt;
	if IsPlayer( touch_entity ) then&lt;br /&gt;
		local player = CastToPlayer( touch_entity )&lt;br /&gt;
		--this new variable is of type CFFPlayer; we can use any player function on it&lt;br /&gt;
		player:SetLocation(entity:GetId(), self.text, self.team)&lt;br /&gt;
	end&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;2&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;AddAmmo&amp;#039;&amp;#039;&amp;#039;([[Lua:Flags#Ammo]], integer) || Gives ammunition to the player&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddArmor&amp;#039;&amp;#039;&amp;#039;(integer) ||Gives armor to the player&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddFrags&amp;#039;&amp;#039;&amp;#039;(integer) ||Adds to the player&amp;#039;s kill count&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddFortPoints&amp;#039;&amp;#039;&amp;#039;(integer, string) ||Gives the player Fortress Points. String is an explanation for the points, eg. &amp;quot;Hunted Escape&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddHealth&amp;#039;&amp;#039;&amp;#039;(integer, bool) ||Gives the player health points. Negative numbers will hurt the player. If set to true the player will over-heal their maximum health.&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetFortPoints&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s Fortress Points.&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetFrags&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s Frag count.&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetDeaths&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s death count.&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetClass&amp;#039;&amp;#039;&amp;#039;() ||Returns the class of the player as a number (0-9)&lt;br /&gt;
|-&lt;br /&gt;
| string &amp;#039;&amp;#039;&amp;#039;GetName&amp;#039;&amp;#039;&amp;#039;() ||Returns the name of the player&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetArmor&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s armor level&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetMaxArmor&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s max armor&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetHealth&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s health points&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetMaxHealth&amp;#039;&amp;#039;&amp;#039;() || Returns the player&amp;#039;s max health&lt;br /&gt;
|-&lt;br /&gt;
| float &amp;#039;&amp;#039;&amp;#039;GetSpeed&amp;#039;&amp;#039;&amp;#039;() || Returns the speed of the player&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;HasItem&amp;#039;&amp;#039;&amp;#039;(string) || returns true or false is the player is holding the named [[Lua:info_ff_script]]&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsFeetDeepInWater&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInNoBuild&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsUnderWater&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsWaistDeepInWater&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInAttack1&amp;#039;&amp;#039;&amp;#039;() || Is the player pressing his *primary attack* key?&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInAttack2&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInUse&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInJump&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInForward&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInBack&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInMoveLeft&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInMoveRight&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInLeft&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInRight&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInRun&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInReload&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInSpeed&amp;#039;&amp;#039;&amp;#039;() || same as walk?&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInWalk&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInZoom&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsOnGround&amp;#039;&amp;#039;&amp;#039;() &lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsInAir&amp;#039;&amp;#039;&amp;#039;( int )|| Checks if the player is the specified number of units above the ground.&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsDucking&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsGrenade1Primed&amp;#039;&amp;#039;&amp;#039;() || Player has a live frag grenade&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsGrenade2Primed&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsGrenadePrimed&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsFlashlightOn&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetAmmoInClip&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetAmmoInClip&amp;#039;&amp;#039;&amp;#039;( weaponname )&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetAmmoInClip&amp;#039;&amp;#039;&amp;#039;( num )&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetAmmoInClip&amp;#039;&amp;#039;&amp;#039;( weaponname, num )&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetAmmoCount&amp;#039;&amp;#039;&amp;#039;( ammotype )&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;ReloadClips&amp;#039;&amp;#039;&amp;#039;() || magic reload!&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsBot&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;MarkRadioTag&amp;#039;&amp;#039;&amp;#039;() || No uses found&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveArmor&amp;#039;&amp;#039;&amp;#039;(integer) || Removes armor from the player&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveLocation&amp;#039;&amp;#039;&amp;#039;(entityId) || Clears the player&amp;#039;s location info? Never used.&lt;br /&gt;
|-&lt;br /&gt;
| string &amp;#039;&amp;#039;&amp;#039;GetLocation&amp;#039;&amp;#039;&amp;#039;() || Returns the current map location of the player&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Respawn&amp;#039;&amp;#039;&amp;#039;() || Respawn the player.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetDisguisable&amp;#039;&amp;#039;&amp;#039;(boolean) || Allow/disallow a spy to use disguise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetDisguise&amp;#039;&amp;#039;&amp;#039;(int teamId, int classId, bool isInstant) || Changes the player&amp;#039;s disguise.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;ResetDisguise&amp;#039;&amp;#039;&amp;#039;() || Resets the player&amp;#039;s disguise.&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsDisguisable&amp;#039;&amp;#039;&amp;#039;() || returns whether the player is allowed to disguise&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetCloakable&amp;#039;&amp;#039;&amp;#039;(boolean) || Allow/disallow a spy to use cloak&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsCloakable&amp;#039;&amp;#039;&amp;#039;() || returns whether the player is allowed to cloak&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetRespawnable&amp;#039;&amp;#039;&amp;#039;(boolean) || Send false to make players stay dead (unable to respawn).&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsRespawnable&amp;#039;&amp;#039;&amp;#039;() || See above.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetLocation&amp;#039;&amp;#039;&amp;#039;(entityId, string, [[Lua:Flags#Team]]) || Sends text to the player&amp;#039;s location HUD. Team determines the color of the text.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetRespawnDelay&amp;#039;&amp;#039;&amp;#039;  || Probably should send this an integer or float.&lt;br /&gt;
|-&lt;br /&gt;
| string &amp;#039;&amp;#039;&amp;#039;GetActiveWeaponName&amp;#039;&amp;#039;&amp;#039;() || returns the [[Lua:weapon_classes]] of the weapon equipped by the player, eg. &amp;quot;ff_weapon_spanner&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GiveWeapon&amp;#039;&amp;#039;&amp;#039;(string, boolean) || Give the player a weapon, specified by [[Lua:weapon_classes]]. If boolean is set to true, the player will autoswitch to this weapon.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveWeapon&amp;#039;&amp;#039;&amp;#039;(string) || Take from the player a weapon, specified by [[Lua:weapon_classes]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveAllWeapons&amp;#039;&amp;#039;&amp;#039;() || Strip all the player&amp;#039;s weapons.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveAllAmmo&amp;#039;&amp;#039;&amp;#039;(boolean)&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsCloaked&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsDisguised&amp;#039;&amp;#039;&amp;#039;() &lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetDisguisedClass&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetDisguisedTeam&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddEffect&amp;#039;&amp;#039;&amp;#039;( [[Lua:Flags#EF]], EFFECT_DURATION, ICON_DURATION, SPEED_MULTIPLIER ) || Adds a status affect to the player. SPEED_MULTIPLIER is used for altering the player&amp;#039;s speed.&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsEffectActive&amp;#039;&amp;#039;&amp;#039;([[Lua:Flags#EF]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveEffect&amp;#039;&amp;#039;&amp;#039;([[Lua:Flags#EF]]) || Cancels a status effect on the player&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetId&amp;#039;&amp;#039;&amp;#039;() || Gets the ID number of the player&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetSteamID&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| integer &amp;#039;&amp;#039;&amp;#039;GetPing&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetPacketloss&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsAlive&amp;#039;&amp;#039;&amp;#039;()&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Freeze&amp;#039;&amp;#039;&amp;#039;(boolean) || Stop the player from moving or shooting. Send false to unfreeze a player.&lt;br /&gt;
|-&lt;br /&gt;
| boolean &amp;#039;&amp;#039;&amp;#039;IsFrozen&amp;#039;&amp;#039;&amp;#039;() || Returns true or false depending on whether the player is in a frozen state.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveBuildables&amp;#039;&amp;#039;&amp;#039;() || Removes all the player&amp;#039;s owned buildables ( [[Buildables|List of buildables]] )&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveProjectiles&amp;#039;&amp;#039;&amp;#039;() || Removes all the player&amp;#039;s owned projectiles ( rockets, nails, etc. )&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RemoveItems&amp;#039;&amp;#039;&amp;#039;() || Removes all the player&amp;#039;s owned buildables AND projectiles.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;LockInPlace&amp;#039;&amp;#039;&amp;#039;(boolean) || Stop the player from moving, and disable their gravity. Player can still rotate and shoot. Send false to unlock player.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetGravity&amp;#039;&amp;#039;&amp;#039;(float) || Sets the player&amp;#039;s gravity.&lt;br /&gt;
|-&lt;br /&gt;
| float &amp;#039;&amp;#039;&amp;#039;GetGravity&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s gravity.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetVelocity&amp;#039;&amp;#039;&amp;#039;( Vector(0,0,0) ) || Sets the player&amp;#039;s velocity.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetVelocity&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s velocity.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SpeedMod&amp;#039;&amp;#039;&amp;#039;(float) || Sets a host_timescale type movement to the player&amp;#039;s speed.&lt;br /&gt;
|-&lt;br /&gt;
| float &amp;#039;&amp;#039;&amp;#039;GetSpeedMod&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s speed mod.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;EmitSound&amp;#039;&amp;#039;&amp;#039;(String) || Causes the player or assigned entity to emit a sound. Make sure to precache sounds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetSentryGun&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s Sentry gun or nil if it&amp;#039;s unbuilt.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetDispenser&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s Dispenser or nil if it&amp;#039;s unbuilt.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetDetpack&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s Detpack or nil if it&amp;#039;s unbuilt.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetJumpPad&amp;#039;&amp;#039;&amp;#039;() || Gets the player&amp;#039;s Jump Pad or nil if it&amp;#039;s unbuilt.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetFriction&amp;#039;&amp;#039;&amp;#039;() || Sets the player&amp;#039;s friction similar to sv_friction&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
[[Category:Lua_Commands]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Flags&amp;diff=10072</id>
		<title>Lua:Flags</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Flags&amp;diff=10072"/>
		<updated>2015-04-24T03:13:31Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox mapping}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Class&lt;br /&gt;
|usage=Returns a specific class ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Player.kScout | Scout Class }}&lt;br /&gt;
{{Lua:Flag|Player.kSniper | Sniper Class}}&lt;br /&gt;
{{Lua:Flag|Player.kSoldier | Soldier Class}}&lt;br /&gt;
{{Lua:Flag|Player.kDemoman | Demoman Class}}&lt;br /&gt;
{{Lua:Flag|Player.kMedic | Medic Class}}&lt;br /&gt;
{{Lua:Flag|Player.kHwGuy | Heavy Weapons Class}}&lt;br /&gt;
{{Lua:Flag|Player.kPyro | Pyro Class}}&lt;br /&gt;
{{Lua:Flag|Player.kSpy | Spy Class}}&lt;br /&gt;
{{Lua:Flag|Player.kEngineer | Engineer Class}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( touch_entity ) &lt;br /&gt;
if player:GetClass() == Player.kSniper then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Team&lt;br /&gt;
|usage=Returns a specific team&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Team.kUnassigned|The Unassigned team consists of players that have not picked a team)}}&lt;br /&gt;
{{Lua:Flag|Team.kSpectator|Spectators}}&lt;br /&gt;
{{Lua:Flag|Team.kRed|The Red team}}&lt;br /&gt;
{{Lua:Flag|Team.kBlue|The Blue team}}&lt;br /&gt;
{{Lua:Flag|Team.kYellow|The Yellow team}}&lt;br /&gt;
{{Lua:Flag|Team.kGreen|The Green team}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( touch_entity ) &lt;br /&gt;
if player:GetTeamId() == Team.kRed then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Grenade&lt;br /&gt;
|usage=Returns a specific grenade&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Grenade.kNormal|Frag grenade (All classes except Scout and Civilian)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kCaltrop|Caltrop grenades are no longer in the game}}&lt;br /&gt;
{{Lua:Flag|Grenade.kNail|Nail Grenade (Soldier)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kMirv|Mirv grenade (Demoman)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kMirvlet|The four mini-grenades that come out of the Mirv grenade (Demoman)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kConc|Concussion grenade (Scout and Medic)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kNapalm|Napalm grenade (Pyro)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kGas|Gas grenade (Spy)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kEmp|EMP grenade (Engineer)}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local grenade = CastToGrenade( explode_entity ) &lt;br /&gt;
if grenade:Type() == Grenade.kNormal then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Damage&lt;br /&gt;
|usage=Returns a specific damage type&amp;#039;s ID; predominately used to detect fall damage&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Damage.kGeneric|Generic damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kCrush|Crushing damage (as in by an elevator or door)}}&lt;br /&gt;
{{Lua:Flag|Damage.kBullet|Bullet damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kSlash|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kBurn|Burn damage (maybe by pyro, maybe by trigger_hurt)}}&lt;br /&gt;
{{Lua:Flag|Damage.kVehicle|Vehicle damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kFall|Fall damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kBlast|Blast damage, DamageID 64}}&lt;br /&gt;
{{Lua:Flag|Damage.kClub|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kShock|Shock damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kSonic|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kEnergyBeam|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPreventPhysForce|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNeverGib|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAlwaysGib|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDrown|Drowning damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kTimeBased|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kParalyze|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNerveGas|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPoison|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kRadiation|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDrownRecover|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAcid|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kSlowBurn|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kRemoveNoRagdoll|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPhysgun|Unknown; likely not applicable}}&lt;br /&gt;
{{Lua:Flag|Damage.kPlasma|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAirboat|Likely not applicable}}&lt;br /&gt;
{{Lua:Flag|Damage.kDissolve|Can be dealt by a trigger_hurt}}&lt;br /&gt;
{{Lua:Flag|Damage.kBlastSurface|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDirect|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kBuckshot|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kGibCorpse|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kShownHud|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNoPhysForce|Unknown}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local damagetype = damageinfo:GetDamageType()&lt;br /&gt;
if damagetype == Damage.kFall then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Ammo&lt;br /&gt;
|usage=Returns a specific ammo type&amp;#039;s ID; predominately used to add or remove ammo from a player&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Ammo.kShells|[[Reference:Ammo#Shell|Shell]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kCells|[[Reference:Ammo#Cell|Cell]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kNails|[[Reference:Ammo#Nail|Nail]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kRockets|[[Reference:Ammo#Rocket|Rocket]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kDetpack|[[Reference:Ammo#Detpack|Detpack]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kManCannon|[[Reference:Ammo#Jump Pad|Jump Pad]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kGren1|[[Reference:Grenades|Primary grenade]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kGren2|[[Reference:Grenades|Secondary grenade]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kInvalid|Unknown}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( player_entity )&lt;br /&gt;
&lt;br /&gt;
player:AddAmmo( Ammo.kNails, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kShells, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kRockets, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kCells, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kDetpack, 1 )&lt;br /&gt;
player:AddAmmo( Ammo.kManCannon, 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=EF&lt;br /&gt;
|usage=Returns a specific status effect&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|EF.kOnfire|[[:Category:Status_Effects#On_Fire|On Fire]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kConc|[[:Category:Status_Effects#Concussed|Concussed]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kGas|[[:Category:Status_Effects#Hallucinations|Hallucinati ons]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kInfect|[[:Category:Status_Effects#Infected|Infected]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kRadiotag|[[:Category:Status_Effects#Transmitting|Transmitting]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kHeadshot|Headshot status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kLegshot|[[:Category:Status_Effects#Crippled|Crippled]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kTranq|[[:Category:Status_Effects#Tranquilized|Tranquilized]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kCaltrop|Defunct}}&lt;br /&gt;
{{Lua:Flag|EF.kACSpinup|Assault Cannon spinup status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kSniperrifle|Unknown}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua1|Custom speed effect 1}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua2|Custom speed effect 2}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua3|Custom speed effect 3}}&lt;br /&gt;
{{Lua:Flag|...|...}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua10|Custom speed effect 10}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( player_entity )&lt;br /&gt;
&lt;br /&gt;
SPEED_MULTIPLIER = 2.0&lt;br /&gt;
EFFECT_DURATION = -1 -- Infinite duration&lt;br /&gt;
ICON_DURATION = 0&lt;br /&gt;
&lt;br /&gt;
player:AddEffect( EF.kSpeedlua1, EFFECT_DURATION, ICON_DURATION, SPEED_MULTIPLIER )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=AT&lt;br /&gt;
|usage=Returns a specific &amp;quot;apply to&amp;quot; ID; Applies various commands to players, or to the entire server. Use with [[ApplyToAll]](ApplyToFlags), [[ApplyToTeam]](team, ApplyToFlags), or [[ApplyToPlayer]](player, ApplyToFlags) (not all flags are suitable for all functions). &lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|AT.kKillPlayers|}}&lt;br /&gt;
{{Lua:Flag|AT.kRespawnPlayers|}}&lt;br /&gt;
{{Lua:Flag|AT.kDropItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kForceDropItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kThrowItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kForceThrowItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kReturnCarriedItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kReturnDroppedItems|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveRagdolls|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemovePacks|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveProjectiles|}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveBuildables|}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveDecals|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kEndMap|ApplyToAll only}}&lt;br /&gt;
{{Lua:Flag|AT.kReloadClips|}}&lt;br /&gt;
{{Lua:Flag|AT.kAllowRespawn|}} &lt;br /&gt;
{{Lua:Flag|AT.kDisallowRespawn|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassScout|}}   &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSniper|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSoldier|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassDemoman|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassMedic|}}  &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassHWGuy|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassPyro|}}  &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSpy|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassEngineer|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassCivilian|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassRandom|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamBlue|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamRed|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamYellow|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamGreen|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamSpectator|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kStopPrimedGrens|}}&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=ClipFlags&lt;br /&gt;
|usage=Used with [[Lua:trigger_ff_clip]] to determine what types of entities are allowed to pass through the trigger.&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamBlue|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamRed|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamYellow|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamGreen|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllPlayers|}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllGrenades|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllProjectiles|projectiles such as nails and rockets.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBullets|hitscan weapons such as shotguns.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBuildables|Can buildables be placed?}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBuildableWeapons|Can sentries fire through?}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBackpacks|Thrown/dropped ammo.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllInfoScripts|Flags, balls, etc. These currently cannot be filtered by team.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllSpawnTurrets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllNonPlayers|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipPlayersByTeam or ClipFlags.kClipPlayers|The following pairs behave identically; the first form is preferred, but the second form is for backwards-compatibility.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipGrenadesByTeam or ClipFlags.kClipGrenades|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipProjectilesByTeam or ClipFlags.kClipProjectiles|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBulletsByTeam or ClipFlags.kClipBullets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBuildablesByTeam or ClipFlags.kClipBuildables|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBuildableWeaponsByTeam or ClipFlags.kClipBuildableWeapons|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBackpacksByTeam or ClipFlags.kClipBackpacks|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipSpawnTurretsByTeam or ClipFlags.kClipSpawnTurrets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipNonPlayersByTeam or ClipFlags.kClipNonPlayers|}}&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
This clip brush will be solid to everything except blue players.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
clip_example = trigger_ff_clip:new({ clipflags = {&lt;br /&gt;
ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamRed, &lt;br /&gt;
ClipFlags.kClipTeamYellow, ClipFlags.kClipTeamGreen, &lt;br /&gt;
ClipFlags.kClipAllNonPlayers} })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=CF&lt;br /&gt;
|usage=Returns a specific &amp;quot;collection filter&amp;quot; ID;. Use with [[Lua:Collection|Collection()]] functions to add certain entities to a list.&lt;br /&gt;
|flags=&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kNone|No filter}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kPlayers|}}&lt;br /&gt;
{{Lua:Flag|CF.kHumanPlayers|Meaning bots are excluded.}}&lt;br /&gt;
{{Lua:Flag|CF.kBotPlayers|FF does not support bots at this time.}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerScout|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSniper|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSoldier|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerDemoman|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerMedic|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerHWGuy|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerPyro|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSpy|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerEngineer|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerCivilian|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kTeams|Not sure if the team filters work on just players or on any team-aligned object.}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamSpec|Spectators}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamBlue|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamRed|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamYellow|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamGreen|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kProjectiles|Applies to non-hitscan projectile weapons like rockets.}}&lt;br /&gt;
{{Lua:Flag|CF.kGrenades|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScipts|Applies to any info_ff_script}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Carried| Use the following on info_ff_scripts to determine their status}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Dropped|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Returned|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Active|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Inactive|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Removed|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kTraceBlockWalls|This flag must be used if you are using the [[Lua:Collection#GetInSphere|Collection:GetInSphere]] function.}}&lt;br /&gt;
				&lt;br /&gt;
{{Lua:Flag|CF.kBuildables|}}&lt;br /&gt;
{{Lua:Flag|CF.kDispenser|}}&lt;br /&gt;
{{Lua:Flag|CF.kSentrygun|}}&lt;br /&gt;
{{Lua:Flag|CF.kDetpack|}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local col = Collection()&lt;br /&gt;
&lt;br /&gt;
-- get all blue snipers&lt;br /&gt;
col:GetByFilter( { CF.kPlayers, CF.kPlayerSniper, CF.kTeamBlue } )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Color&lt;br /&gt;
|usage=Shorthand for some common colors&lt;br /&gt;
|flags=&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|Color.kInvalid|}}&lt;br /&gt;
{{Lua:Flag|Color.kDefault|}}&lt;br /&gt;
{{Lua:Flag|Color.kBlue|}}&lt;br /&gt;
{{Lua:Flag|Color.kRed|}}&lt;br /&gt;
{{Lua:Flag|Color.kYellow|}}&lt;br /&gt;
{{Lua:Flag|Color.kGreen|}}&lt;br /&gt;
{{Lua:Flag|Color.kWhite|}}&lt;br /&gt;
{{Lua:Flag|Color.kBlack|}}&lt;br /&gt;
{{Lua:Flag|Color.kOrange|}}&lt;br /&gt;
{{Lua:Flag|Color.kPink|}}&lt;br /&gt;
{{Lua:Flag|Color.kPurple|}}&lt;br /&gt;
{{Lua:Flag|Color.kGrey|}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
BroadCastMessage( &amp;quot;Goal!&amp;quot;, 5, Color.kBlue )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Flags&amp;diff=10071</id>
		<title>Lua:Flags</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Flags&amp;diff=10071"/>
		<updated>2015-04-23T02:21:50Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox mapping}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Class&lt;br /&gt;
|usage=Returns a specific class ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Player.kScout | Scout Class }}&lt;br /&gt;
{{Lua:Flag|Player.kSniper | Sniper Class}}&lt;br /&gt;
{{Lua:Flag|Player.kSoldier | Soldier Class}}&lt;br /&gt;
{{Lua:Flag|Player.kDemoman | Demoman Class}}&lt;br /&gt;
{{Lua:Flag|Player.kMedic | Medic Class}}&lt;br /&gt;
{{Lua:Flag|Player.kHwGuy | Heavy Weapons Class}}&lt;br /&gt;
{{Lua:Flag|Player.kPyro | Pyro Class}}&lt;br /&gt;
{{Lua:Flag|Player.kSpy | Spy Class}}&lt;br /&gt;
{{Lua:Flag|Player.kEngineer | Engineer Class}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( touch_entity ) &lt;br /&gt;
if player:GetClass() == Player.kSniper then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Team&lt;br /&gt;
|usage=Returns a specific team&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Team.kUnassigned|The Unassigned team consists of players that have not picked a team)}}&lt;br /&gt;
{{Lua:Flag|Team.kSpectator|Spectators}}&lt;br /&gt;
{{Lua:Flag|Team.kRed|The Red team}}&lt;br /&gt;
{{Lua:Flag|Team.kBlue|The Blue team}}&lt;br /&gt;
{{Lua:Flag|Team.kYellow|The Yellow team}}&lt;br /&gt;
{{Lua:Flag|Team.kGreen|The Green team}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( touch_entity ) &lt;br /&gt;
if player:GetTeamId() == Team.kRed then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Grenade&lt;br /&gt;
|usage=Returns a specific grenade&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Grenade.kNormal|Frag grenade (All classes except Scout and Civilian)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kCaltrop|Caltrop grenades are no longer in the game}}&lt;br /&gt;
{{Lua:Flag|Grenade.kNail|Nail Grenade (Soldier)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kMirv|Mirv grenade (Demoman)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kMirvlet|The four mini-grenades that come out of the Mirv grenade (Demoman)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kConc|Concussion grenade (Scout and Medic)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kNapalm|Napalm grenade (Pyro)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kGas|Gas grenade (Spy)}}&lt;br /&gt;
{{Lua:Flag|Grenade.kEmp|EMP grenade (Engineer)}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local grenade = CastToGrenade( explode_entity ) &lt;br /&gt;
if grenade:Type() == Grenade.kNormal then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Damage&lt;br /&gt;
|usage=Returns a specific damage type&amp;#039;s ID; predominately used to detect fall damage&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Damage.kGeneric|Generic damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kCrush|Crushing damage (as in by an elevator or door)}}&lt;br /&gt;
{{Lua:Flag|Damage.kBullet|Bullet damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kSlash|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kBurn|Burn damage (maybe by pyro, maybe by trigger_hurt)}}&lt;br /&gt;
{{Lua:Flag|Damage.kVehicle|Vehicle damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kFall|Fall damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kBlast|Blast damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kClub|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kShock|Shock damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kSonic|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kEnergyBeam|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPreventPhysForce|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNeverGib|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAlwaysGib|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDrown|Drowning damage}}&lt;br /&gt;
{{Lua:Flag|Damage.kTimeBased|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kParalyze|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNerveGas|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPoison|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kRadiation|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDrownRecover|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAcid|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kSlowBurn|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kRemoveNoRagdoll|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kPhysgun|Unknown; likely not applicable}}&lt;br /&gt;
{{Lua:Flag|Damage.kPlasma|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kAirboat|Likely not applicable}}&lt;br /&gt;
{{Lua:Flag|Damage.kDissolve|Can be dealt by a trigger_hurt}}&lt;br /&gt;
{{Lua:Flag|Damage.kBlastSurface|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kDirect|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kBuckshot|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kGibCorpse|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kShownHud|Unknown}}&lt;br /&gt;
{{Lua:Flag|Damage.kNoPhysForce|Unknown}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local damagetype = damageinfo:GetDamageType()&lt;br /&gt;
if damagetype == Damage.kFall then&lt;br /&gt;
  ...&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Ammo&lt;br /&gt;
|usage=Returns a specific ammo type&amp;#039;s ID; predominately used to add or remove ammo from a player&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|Ammo.kShells|[[Reference:Ammo#Shell|Shell]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kCells|[[Reference:Ammo#Cell|Cell]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kNails|[[Reference:Ammo#Nail|Nail]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kRockets|[[Reference:Ammo#Rocket|Rocket]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kDetpack|[[Reference:Ammo#Detpack|Detpack]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kManCannon|[[Reference:Ammo#Jump Pad|Jump Pad]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kGren1|[[Reference:Grenades|Primary grenade]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kGren2|[[Reference:Grenades|Secondary grenade]] ammo type}}&lt;br /&gt;
{{Lua:Flag|Ammo.kInvalid|Unknown}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( player_entity )&lt;br /&gt;
&lt;br /&gt;
player:AddAmmo( Ammo.kNails, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kShells, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kRockets, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kCells, 400 )&lt;br /&gt;
player:AddAmmo( Ammo.kDetpack, 1 )&lt;br /&gt;
player:AddAmmo( Ammo.kManCannon, 1 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=EF&lt;br /&gt;
|usage=Returns a specific status effect&amp;#039;s ID&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|EF.kOnfire|[[:Category:Status_Effects#On_Fire|On Fire]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kConc|[[:Category:Status_Effects#Concussed|Concussed]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kGas|[[:Category:Status_Effects#Hallucinations|Hallucinati ons]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kInfect|[[:Category:Status_Effects#Infected|Infected]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kRadiotag|[[:Category:Status_Effects#Transmitting|Transmitting]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kHeadshot|Headshot status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kLegshot|[[:Category:Status_Effects#Crippled|Crippled]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kTranq|[[:Category:Status_Effects#Tranquilized|Tranquilized]] status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kCaltrop|Defunct}}&lt;br /&gt;
{{Lua:Flag|EF.kACSpinup|Assault Cannon spinup status effect}}&lt;br /&gt;
{{Lua:Flag|EF.kSniperrifle|Unknown}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua1|Custom speed effect 1}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua2|Custom speed effect 2}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua3|Custom speed effect 3}}&lt;br /&gt;
{{Lua:Flag|...|...}}&lt;br /&gt;
{{Lua:Flag|EF.kSpeedlua10|Custom speed effect 10}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local player = CastToPlayer( player_entity )&lt;br /&gt;
&lt;br /&gt;
SPEED_MULTIPLIER = 2.0&lt;br /&gt;
EFFECT_DURATION = -1 -- Infinite duration&lt;br /&gt;
ICON_DURATION = 0&lt;br /&gt;
&lt;br /&gt;
player:AddEffect( EF.kSpeedlua1, EFFECT_DURATION, ICON_DURATION, SPEED_MULTIPLIER )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=AT&lt;br /&gt;
|usage=Returns a specific &amp;quot;apply to&amp;quot; ID; Applies various commands to players, or to the entire server. Use with [[ApplyToAll]](ApplyToFlags), [[ApplyToTeam]](team, ApplyToFlags), or [[ApplyToPlayer]](player, ApplyToFlags) (not all flags are suitable for all functions). &lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|AT.kKillPlayers|}}&lt;br /&gt;
{{Lua:Flag|AT.kRespawnPlayers|}}&lt;br /&gt;
{{Lua:Flag|AT.kDropItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kForceDropItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kThrowItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kForceThrowItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kReturnCarriedItems|}}&lt;br /&gt;
{{Lua:Flag|AT.kReturnDroppedItems|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveRagdolls|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemovePacks|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveProjectiles|}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveBuildables|}}&lt;br /&gt;
{{Lua:Flag|AT.kRemoveDecals|ApplyToAll only?}}&lt;br /&gt;
{{Lua:Flag|AT.kEndMap|ApplyToAll only}}&lt;br /&gt;
{{Lua:Flag|AT.kReloadClips|}}&lt;br /&gt;
{{Lua:Flag|AT.kAllowRespawn|}} &lt;br /&gt;
{{Lua:Flag|AT.kDisallowRespawn|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassScout|}}   &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSniper|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSoldier|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassDemoman|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassMedic|}}  &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassHWGuy|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassPyro|}}  &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassSpy|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassEngineer|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeClassCivilian|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeClassRandom|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamBlue|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamRed|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamYellow|}}&lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamGreen|}} &lt;br /&gt;
{{Lua:Flag|AT.kChangeTeamSpectator|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|AT.kStopPrimedGrens|}}&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ApplyToAll({ AT.kRemovePacks, AT.kRemoveProjectiles, AT.kRespawnPlayers, AT.kRemoveBuildables, AT.kRemoveRagdolls, AT.kStopPrimedGrens, AT.kReloadClips })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=ClipFlags&lt;br /&gt;
|usage=Used with [[Lua:trigger_ff_clip]] to determine what types of entities are allowed to pass through the trigger.&lt;br /&gt;
|flags=&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamBlue|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamRed|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamYellow|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipTeamGreen|Use in conjunction with &amp;quot;ByTeam&amp;quot; flags.}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllPlayers|}}   &lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllGrenades|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllProjectiles|projectiles such as nails and rockets.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBullets|hitscan weapons such as shotguns.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBuildables|Can buildables be placed?}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBuildableWeapons|Can sentries fire through?}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllBackpacks|Thrown/dropped ammo.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllInfoScripts|Flags, balls, etc. These currently cannot be filtered by team.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllSpawnTurrets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipAllNonPlayers|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipPlayersByTeam or ClipFlags.kClipPlayers|The following pairs behave identically; the first form is preferred, but the second form is for backwards-compatibility.}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipGrenadesByTeam or ClipFlags.kClipGrenades|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipProjectilesByTeam or ClipFlags.kClipProjectiles|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBulletsByTeam or ClipFlags.kClipBullets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBuildablesByTeam or ClipFlags.kClipBuildables|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBuildableWeaponsByTeam or ClipFlags.kClipBuildableWeapons|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipBackpacksByTeam or ClipFlags.kClipBackpacks|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipSpawnTurretsByTeam or ClipFlags.kClipSpawnTurrets|}}&lt;br /&gt;
{{Lua:Flag|ClipFlags.kClipNonPlayersByTeam or ClipFlags.kClipNonPlayers|}}&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
This clip brush will be solid to everything except blue players.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
clip_example = trigger_ff_clip:new({ clipflags = {&lt;br /&gt;
ClipFlags.kClipPlayersByTeam, ClipFlags.kClipTeamRed, &lt;br /&gt;
ClipFlags.kClipTeamYellow, ClipFlags.kClipTeamGreen, &lt;br /&gt;
ClipFlags.kClipAllNonPlayers} })&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=CF&lt;br /&gt;
|usage=Returns a specific &amp;quot;collection filter&amp;quot; ID;. Use with [[Lua:Collection|Collection()]] functions to add certain entities to a list.&lt;br /&gt;
|flags=&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kNone|No filter}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kPlayers|}}&lt;br /&gt;
{{Lua:Flag|CF.kHumanPlayers|Meaning bots are excluded.}}&lt;br /&gt;
{{Lua:Flag|CF.kBotPlayers|FF does not support bots at this time.}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerScout|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSniper|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSoldier|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerDemoman|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerMedic|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerHWGuy|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerPyro|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerSpy|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerEngineer|}}&lt;br /&gt;
{{Lua:Flag|CF.kPlayerCivilian|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kTeams|Not sure if the team filters work on just players or on any team-aligned object.}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamSpec|Spectators}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamBlue|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamRed|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamYellow|}}&lt;br /&gt;
{{Lua:Flag|CF.kTeamGreen|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kProjectiles|Applies to non-hitscan projectile weapons like rockets.}}&lt;br /&gt;
{{Lua:Flag|CF.kGrenades|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScipts|Applies to any info_ff_script}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Carried| Use the following on info_ff_scripts to determine their status}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Dropped|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Returned|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Active|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Inactive|}}&lt;br /&gt;
{{Lua:Flag|CF.kInfoScript_Removed|}}&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|CF.kTraceBlockWalls|This flag must be used if you are using the [[Lua:Collection#GetInSphere|Collection:GetInSphere]] function.}}&lt;br /&gt;
				&lt;br /&gt;
{{Lua:Flag|CF.kBuildables|}}&lt;br /&gt;
{{Lua:Flag|CF.kDispenser|}}&lt;br /&gt;
{{Lua:Flag|CF.kSentrygun|}}&lt;br /&gt;
{{Lua:Flag|CF.kDetpack|}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local col = Collection()&lt;br /&gt;
&lt;br /&gt;
-- get all blue snipers&lt;br /&gt;
col:GetByFilter( { CF.kPlayers, CF.kPlayerSniper, CF.kTeamBlue } )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Lua:FlagType&lt;br /&gt;
|prefix=Color&lt;br /&gt;
|usage=Shorthand for some common colors&lt;br /&gt;
|flags=&lt;br /&gt;
&lt;br /&gt;
{{Lua:Flag|Color.kInvalid|}}&lt;br /&gt;
{{Lua:Flag|Color.kDefault|}}&lt;br /&gt;
{{Lua:Flag|Color.kBlue|}}&lt;br /&gt;
{{Lua:Flag|Color.kRed|}}&lt;br /&gt;
{{Lua:Flag|Color.kYellow|}}&lt;br /&gt;
{{Lua:Flag|Color.kGreen|}}&lt;br /&gt;
{{Lua:Flag|Color.kWhite|}}&lt;br /&gt;
{{Lua:Flag|Color.kBlack|}}&lt;br /&gt;
{{Lua:Flag|Color.kOrange|}}&lt;br /&gt;
{{Lua:Flag|Color.kPink|}}&lt;br /&gt;
{{Lua:Flag|Color.kPurple|}}&lt;br /&gt;
{{Lua:Flag|Color.kGrey|}}&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
BroadCastMessage( &amp;quot;Goal!&amp;quot;, 5, Color.kBlue )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10070</id>
		<title>Category:Global Callbacks</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Global_Callbacks&amp;diff=10070"/>
		<updated>2015-04-13T22:20:51Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* A short list */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox mapping}}&lt;br /&gt;
These are Callbacks which are not connected with any game entity. Declare the function in your lua script, and the game will run it at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function startup()&lt;br /&gt;
	-- set up team limits&lt;br /&gt;
	local team = GetTeam( Team.kBlue )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kRed )&lt;br /&gt;
	team:SetPlayerLimit( 0 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kYellow )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
&lt;br /&gt;
	team = GetTeam( Team.kGreen )&lt;br /&gt;
	team:SetPlayerLimit( -1 )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A short list==&lt;br /&gt;
This list needs a LOT of work!&lt;br /&gt;
*[[Lua:Effect-triggered callbacks]]&lt;br /&gt;
*[[Lua:Flaginfo]]&lt;br /&gt;
*[[Lua:Startup]]&lt;br /&gt;
*[[Lua:shutdown]]() Calls right before map change.&lt;br /&gt;
*[[Lua:Tick]]&lt;br /&gt;
*[[buildable_killed]] ( buildable, damageinfo )&lt;br /&gt;
*[[Lua:player killed]]&lt;br /&gt;
*[[Lua:player ondamage]]&lt;br /&gt;
*[[Lua:player spawn]]&lt;br /&gt;
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others&lt;br /&gt;
*[[Lua:precache]]&lt;br /&gt;
*[[Player onkill]]&lt;br /&gt;
*[[Player switchteam]]&lt;br /&gt;
*[[Player throwgren1]]&lt;br /&gt;
*[[Player throwgren2]]&lt;br /&gt;
*[[player_onuse]] ( player )&lt;br /&gt;
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.&lt;br /&gt;
*[[player_connected]]( player ) Called when a player successfully joins the server&lt;br /&gt;
*[[player_disconnected]]( player )&lt;br /&gt;
*[[Category:Lua]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Entity_functions&amp;diff=10069</id>
		<title>Category:Entity functions</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Entity_functions&amp;diff=10069"/>
		<updated>2015-04-05T21:23:25Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Entity Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox mapping}}&lt;br /&gt;
==Entity Functions==&lt;br /&gt;
&lt;br /&gt;
These Lua functions are common to all entities in FF Generally, any entity placed in the map should work with these.&lt;br /&gt;
*object = baseentity:&amp;#039;&amp;#039;&amp;#039;new&amp;#039;&amp;#039;&amp;#039;({&amp;#039;&amp;#039;collection&amp;#039;&amp;#039;}) creates a Lua object that corresponds to a map entity. You must call new() before you can access any entity through Lua. &amp;#039;&amp;#039;Collection&amp;#039;&amp;#039; is a table you can use to define any custom Lua variables you want. See [[Lua:info_ff_script#Example]] for example code.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
|entity &amp;#039;&amp;#039;&amp;#039;Teleport&amp;#039;&amp;#039;&amp;#039; ( Vector neworigin, QAngle newangles, Vector newvelocity ) || Teleports an entity.&lt;br /&gt;
|-&lt;br /&gt;
|entity &amp;#039;&amp;#039;&amp;#039;GetOwner&amp;#039;&amp;#039;&amp;#039; () || Returns the entity that &amp;quot;owns&amp;quot; the first entity.&lt;br /&gt;
|-&lt;br /&gt;
|entity &amp;#039;&amp;#039;&amp;#039;StartTrail&amp;#039;&amp;#039;&amp;#039; (int teamid, float start_width, float end_width, float lifetime) || Starts a trail with the Team ID as the color.&lt;br /&gt;
|-&lt;br /&gt;
|entity &amp;#039;&amp;#039;&amp;#039;StopTrail&amp;#039;&amp;#039;&amp;#039; () || Stops a trail on an entity.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Lua_Commands]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:info_ff_script&amp;diff=10068</id>
		<title>Lua:info ff script</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:info_ff_script&amp;diff=10068"/>
		<updated>2015-04-05T21:09:06Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Get Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox_mapping}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
info_ff_script is used to represent items that can affect, and be affected by players. Such items might be the flags in a CTF map, or the armor, health and ammo packs in a respawn room.&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 info_ff_script entity in your map, the game attempts to find a correspondingly named object 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;
====Example==== &lt;br /&gt;
Let&amp;#039;s assume you don&amp;#039;t want to use one of FF&amp;#039;s pre-existing base items, and you just want to make your own. For the sake of the example let&amp;#039;s say we&amp;#039;re setting up our own flag as a learning experience.  First, put two info_ff_script entities in your map, and give them the names: &amp;#039;&amp;#039;myfirstflag&amp;#039;&amp;#039; and &amp;#039;&amp;#039;mysecondflag&amp;#039;&amp;#039;. Now, create a new text file, and save the file as &amp;#039;&amp;#039;yourmapname&amp;#039;&amp;#039;.lua.&lt;br /&gt;
&lt;br /&gt;
So far, we don&amp;#039;t have much of anything.  We&amp;#039;ll need to let Lua know that these entities are in our map. As you might expect, there&amp;#039;s other options you can specify here, but this is our first script so we&amp;#039;re going to keep it simple.  This is how we&amp;#039;d get it started in our previously created Lua file.&lt;br /&gt;
&lt;br /&gt;
 -- This is my first base flag!&lt;br /&gt;
 baseflag = info_ff_script:new({&lt;br /&gt;
        name = &amp;quot;base flag&amp;quot;,&lt;br /&gt;
        model = &amp;quot;models/flag/flag.mdl&amp;quot;,&lt;br /&gt;
        modelskin = 1&lt;br /&gt;
 })&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;re probably noticing that nothing in the above bit of Lua has anything directly related to the two named entities you put in your map. We&amp;#039;re creating a new info_ff_script object in Lua, and setting some default parameters. For our example, the model won&amp;#039;t be changing, but we have two flags and we&amp;#039;re going to easily change it&amp;#039;s name and skin.  This &amp;#039;&amp;#039;baseflag&amp;#039;&amp;#039; is our blank that we&amp;#039;ll copy and modify to create other team-specific flags that are sitting in our map.&lt;br /&gt;
&lt;br /&gt;
 --We&amp;#039;re extending our baseflag!&lt;br /&gt;
 myfirstflag = baseflag:new({&lt;br /&gt;
        name = &amp;quot;Flag one&amp;quot;,&lt;br /&gt;
        modelskin = 2&lt;br /&gt;
 })&lt;br /&gt;
&lt;br /&gt;
Any functions and variables we define in baseflag will be inherited by those entities which use it as a base. We can redefine functions and variables in the derived entites, to override the basic functionality.&lt;br /&gt;
==Events, or callbacks==&lt;br /&gt;
info_ff_script has various callbacks that allow your Lua script to detect events that happen in the game.&lt;br /&gt;
&lt;br /&gt;
Access to events is typically in the following format:&lt;br /&gt;
&lt;br /&gt;
 function item:&amp;#039;&amp;#039;&amp;#039;eventname&amp;#039;&amp;#039;&amp;#039;( &amp;#039;&amp;#039;parameters&amp;#039;&amp;#039; )&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;
Different methods may provide data by passing on a number of parameters.  The types of these parameters, returned values and examples of usage can be found in the following links.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;On&amp;quot; Events===&lt;br /&gt;
These callbacks are available to detect when certain events happen to the info_ff_script.&lt;br /&gt;
*[[Info_ff_script:spawn|ondrop( owner_entity )]]--The flag is dropped, either intentionally or by death.&lt;br /&gt;
*[[Info_ff_script:onloseitem|onloseitem( owner_entity )]]--The item is taken from the player for any reason.&lt;br /&gt;
*[[Info_ff_script:onreturn|onreturn()]]--The flag returns to its origin.&lt;br /&gt;
*[[Info_ff_script:onownerdie|onownerdie( owner_entity )]]--A player dies while holding the item.&lt;br /&gt;
*[[Info_ff_script:onownerforcerespawn|onownerforcerespawn( owner_entity )]]--The player is forced to respawn while holding the item.&lt;br /&gt;
*[[Info_ff_script:ownercloak|ownercloak( owner_entity )]]--A spy activates his cloak while holding the item. NOTE: This one doesn&amp;#039;t start with &amp;quot;on&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Other Events===&lt;br /&gt;
*[[Info_ff_script:dropitemcmd|dropitemcmd(owner_entity)]]--The player holding the item presses the dropitems key.&lt;br /&gt;
*[[Info_ff_script:touch|touch( player_entity )]]--The info_ff_script is touched by a player.&lt;br /&gt;
*[[Info_ff_script:precache|precache()]]--Called on each info_ff_script when the map is loaded, but before it starts. See [[Lua:precache]].&lt;br /&gt;
*[[Info_ff_script:materialize|materialize()]]--Called when an item respawns.&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
*dropatspawn()--Return true to make the object drop to the ground when the map loads. Return false to leave it floating where it was placed in Hammer.&lt;br /&gt;
*hasanimation()--Return true if the model used is animated.&lt;br /&gt;
*usephysics()--Return true for dropped items to act as physics props. Default behavior is for the item to stop when it hits the ground.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
Whenever you have a reference to a particular entity, you can use its functions to control its behavior.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
 -- find the flag and cast it to an info_ff_script&lt;br /&gt;
 local flag = GetInfoScriptByName(&amp;quot;redflag&amp;quot;)&lt;br /&gt;
      -- Make sure flag isn&amp;#039;t nil&lt;br /&gt;
      if flag then&lt;br /&gt;
           -- check if the player is carrying the flag&lt;br /&gt;
           if player:HasItem(flag:GetName()) then&lt;br /&gt;
 		-- return the flag&lt;br /&gt;
           	flag:Return()&lt;br /&gt;
           end     &lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
===Attachment Functions===&lt;br /&gt;
These functions can be used to change the offset by which an item is attached to a player. These offsets are relative to the player&amp;#039;s absolute origin. &lt;br /&gt;
*[[Info_ff_script:attachoffsetforward|attachoffsetforward]]&lt;br /&gt;
*[[Info_ff_script:attachoffsetright|attachoffsetright]]&lt;br /&gt;
*[[Info_ff_script:attachoffsetup|attachoffsetup]]&lt;br /&gt;
&lt;br /&gt;
===Get Functions===&lt;br /&gt;
Get functions return some information. Information you can use.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:GetAngles]]() || Returns an orientation array. (p,y,r, I believe)&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:GetOrigin]] () || Returns a location array. (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:GetName]] () || Returns a string containing the name of the info_ff_script.&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:gettouchsizes]] ( mins, maxs )  || Passes min and max vectors by reference for the function to alter in place.&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:getphysicssizes]] ( mins, maxs )  || Passes min and max vectors by reference for the function to alter in place.&lt;br /&gt;
|-&lt;br /&gt;
|[[Info_ff_script:getbloatsize]] () || Expects a float return value, uses the value to inflate the touch bounding box (default bloat is 12).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Set Functions===&lt;br /&gt;
These functions change some property of the info_ff_script.&lt;br /&gt;
*[[info_ff_script:SetAngles|SetAngles]](angles) Turns the item to a specific angle.&lt;br /&gt;
*[[info_ff_script:SetModel|SetModel]](string) Sets the model of the item. Remember to [[Lua:Precache|precache]].&lt;br /&gt;
*[[info_ff_script:SetOrigin|SetOrigin]](origin) Moves the item to a specific spot on the map.&lt;br /&gt;
*[[info_ff_script:SetSkin|SetSkin]](int) Changes the skin of the model.&lt;br /&gt;
*[[info_ff_script:SetStartAngles|SetStartAngles]](angles) Sets the orientation of the item for when it respawns.&lt;br /&gt;
*[[info_ff_script:SetStartOrigin|SetOrigin]](origin) Sets the location of the item for when it respawns.&lt;br /&gt;
&lt;br /&gt;
===State Checking Functions===&lt;br /&gt;
These all return true or false. You&amp;#039;ll generally use them in a conditional statement.&lt;br /&gt;
*[[Info_ff_script:IsActive|IsActive]]&lt;br /&gt;
*[[Info_ff_script:IsCarried|IsCarried]]&lt;br /&gt;
*[[Info_ff_script:IsDropped|IsDropped]]&lt;br /&gt;
*[[Info_ff_script:IsInactive|IsInactive]]&lt;br /&gt;
*[[Info_ff_script:IsRemoved|IsRemoved]]&lt;br /&gt;
*[[Info_ff_script:IsReturned|IsReturned]]&lt;br /&gt;
&lt;br /&gt;
===Misc. Functions===&lt;br /&gt;
*addnotouch() Defined in base_teamplay. Default behavior is to prevent the player from picking up the flag for 2 seconds after dropping it. Disabling this behavior will prevent players from being able to throw the flag at all--or rather, they will throw it, and pick it up an instant later.&lt;br /&gt;
*new({collection}) creates a new type of info_ff_script. See [[Lua:info_ff_script#Example]]&lt;br /&gt;
*Drop(FLAG_RETURN_TIME, FLAG_THROW_SPEED) Causes the player to throw/drop the flag.&lt;br /&gt;
*Pickup(player) Causes the specified player to carry this item.&lt;br /&gt;
*Respawn(int) Causes the item to disappear, and reappear after a specified number of seconds.&lt;br /&gt;
*Return() Causes the item to return to its starting point.&lt;br /&gt;
*EmitSound(String) Causes the item to make a sound.&lt;br /&gt;
*Remove() Causes the item to disappear from the map.&lt;br /&gt;
*Restore() Re-enables an item that has been removed.&lt;br /&gt;
[[Category:Lua]][[Category:Lua_Commands]][[Category:Lua_Callbacks]]&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10067</id>
		<title>Lua:Entity typing</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10067"/>
		<updated>2015-04-05T20:55:29Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Entity Checking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
Lua is a dynamically typed language--this means that a variable can hold any type of data at any time. C objects, such as those used in Fortress Forever, are accessed as blocks of raw data. Because altering these objects incorrectly can cause the game to crash, It&amp;#039;s important that the Lua system correctly knows what type of class it is dealing with.&lt;br /&gt;
&lt;br /&gt;
==FF Object Types==&lt;br /&gt;
===CBaseEntity===&lt;br /&gt;
This is the basic type from which all other entities are derived. Consequently there&amp;#039;s not a lot you can do with it--see [[:Category:Entity_functions]]. When naming an object of this type, it&amp;#039;s best to use the word &amp;quot;entity&amp;quot; to prevent confusion.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CBaseEntity:&lt;br /&gt;
*[[Lua:GetEntity|GetEntity]]( int ) Every entity in the game has a unique ID number. Use the [[Lua:GetId|GetId]]() function to access this number for a particular entity.&lt;br /&gt;
*[[Lua:GetEntityByName|GetEntityByName]]( String )&lt;br /&gt;
*String [[Lua:GetClassName|GetClassName]]() Returns the entity type as a string.&lt;br /&gt;
===InfoScript===&lt;br /&gt;
An InfoScript is created by using the [[Lua:info_ff_script | info_ff_script]]:new() command in lua, and placing an info_ff_script in a map. This is usually a game item such as a flag, ball, or supply pack,&lt;br /&gt;
&lt;br /&gt;
The following commands will return an InfoScript:&lt;br /&gt;
*[[Lua:GetInfoScriptById|GetInfoScriptById]]( int )&lt;br /&gt;
*[[Lua:GetInfoScriptByName|GetInfoScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===TriggerScript===&lt;br /&gt;
This is similar to InfoScript, but it&amp;#039;s brush-based. Cap points and nobuild zones are Trigger scripts.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a TriggerScript:&lt;br /&gt;
*[[Lua:GetTriggerScriptByName|GetTriggerScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===CFFPlayer===&lt;br /&gt;
This refers to any client on the server. See [[:Category:Player_functions]] For a list of what you can do with CFFPlayer.&lt;br /&gt;
The following commands will return a CFFPlayer:&lt;br /&gt;
*[[Lua:GetPlayer|GetPlayer]]( entity ) --This would appear to do the same thing as CastToPlayer (see below). Use that instead.	&lt;br /&gt;
*[[Lua:GetPlayerByID|GetPlayerByID]]( int )&lt;br /&gt;
&lt;br /&gt;
===CFFTeam===&lt;br /&gt;
This refers to one of six teams--&amp;quot;Unassigned&amp;quot; and Spectators, in addition to Blue, Red, Yellow, and Green. See [[:Category:Team_functions]] For a list of what you can do with CFFTeam.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CFFTeam:&lt;br /&gt;
*[[Lua:GetTeam|GetTeam]]( teamId ) This returns a CFFTeam object when given a team number. See [[Lua:Flags#Team]].&lt;br /&gt;
===CFFBuildableObject===&lt;br /&gt;
Objects that the player can place or build. Includes dispensers, sentry guns, mancannons, and detpacks. See [[:Category:Buildable_functions]].&lt;br /&gt;
===CFFGrenadeBase===&lt;br /&gt;
Refers to thrown grenades&lt;br /&gt;
*[[Lua:GetGrenade|GetGrenade]]() TODO: what parameters does this take?&lt;br /&gt;
===CTakeDamageInfo===&lt;br /&gt;
Damageinfo is an object that&amp;#039;s passed along whenever a player is damaged or dies. By intercepting this object, you can detect events in the game, or change the outcome of those events. Damageinfo can be accessed from within the callbacks player_ondamage and player_killed. See [[:Category:Damageinfo_functions]].&lt;br /&gt;
&lt;br /&gt;
==Entity Checking==&lt;br /&gt;
Often in a lua script an entity will be passed to the script as a CBaseEntity. To gain access to more specific functions, we must &amp;#039;&amp;#039;cast&amp;#039;&amp;#039; the variable to a more specific type. But before casting to a more specific type of object, it&amp;#039;s usually necessary to verify that the object exists, and that it&amp;#039;s the kind of object we expect. Failing to do so can cause the script to fail and the game to crash.&lt;br /&gt;
&lt;br /&gt;
If these functions return &amp;#039;&amp;#039;true&amp;#039;&amp;#039;, it is safe to cast to that type of object.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsPlayer|IsPlayer]]( ent_id ) || used to see if a passed in entity is a player to before actions are performed on said player.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsEntity|IsEntity]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsInfoScript|IsInfoScript]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDispenser|IsDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsSentrygun|IsSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDetpack|IsDetpack]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsGrenade|IsGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsProjectile|IsProjectile]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsBuildable|IsBuildable]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsJumpPad|IsJumpPad]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsTurret|IsTurret]]( ent_id ) || Refers to respawn turrets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Casting Commands==&lt;br /&gt;
A casting function accepts a CBaseEntity and returns the requested type of object, which you can assign to a new variable.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToBeam|CastToBeam]]( ent_id ) || tries to cast the entity to a beam (to see if whatever triggered the event was a laser beam, a la SD2). If it fails, it returns null.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToPlayer|CastToPlayer]]( ent_id ) || used to cast the passed in entity to a player, often used for touch commands.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToInfoScript|CastToInfoScript]]( ent_id ) || This may be a flag, resupply pack, or the like.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerScript|CastToTriggerScript]]( ent_id ) || This may be any kind of brush trigger that&amp;#039;s referred to in an active lua script.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerClip|CastToTriggerClip]]( ent_id ) || Refers to a [[Lua:trigger_ff_clip|trigger_ff_clip]].&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToGrenade|CastToGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDispenser|CastToDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToSentrygun|CastToSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDetpack|CastToDetpack]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToBuildable|CastToBuildable]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToProjectile|CastToProjectile]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToJumpPad|CastToJumpPad]]( ent_id ) || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;--This callback runs when something explodes inside the trigger name detpack_trigger.&lt;br /&gt;
function detpack_trigger:onexplode( trigger_entity )&lt;br /&gt;
	--We want to know if this mysterious exploding CBaseEntity is a detpack. If not we can skip the rest.&lt;br /&gt;
	if IsDetpack( trigger_entity ) then&lt;br /&gt;
		local detpack = CastToDetpack( trigger_entity )&lt;br /&gt;
		--now that we have a detpack object, we can ask it what team it belongs to.&lt;br /&gt;
		if detpack:GetTeamId() == attackers then&lt;br /&gt;
			--This triggers a logic_relay in the map, which opens the hole and can trigger any other effect.&lt;br /&gt;
			OutputEvent( self.prefix .. &amp;quot;_detpack_relay&amp;quot;, &amp;quot;Trigger&amp;quot; )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--This line tells all grenades, etc. that it&amp;#039;s still OK to explode.&lt;br /&gt;
	return EVENT_ALLOWED&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10066</id>
		<title>Lua:Entity typing</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10066"/>
		<updated>2015-04-05T20:54:05Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Casting Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
Lua is a dynamically typed language--this means that a variable can hold any type of data at any time. C objects, such as those used in Fortress Forever, are accessed as blocks of raw data. Because altering these objects incorrectly can cause the game to crash, It&amp;#039;s important that the Lua system correctly knows what type of class it is dealing with.&lt;br /&gt;
&lt;br /&gt;
==FF Object Types==&lt;br /&gt;
===CBaseEntity===&lt;br /&gt;
This is the basic type from which all other entities are derived. Consequently there&amp;#039;s not a lot you can do with it--see [[:Category:Entity_functions]]. When naming an object of this type, it&amp;#039;s best to use the word &amp;quot;entity&amp;quot; to prevent confusion.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CBaseEntity:&lt;br /&gt;
*[[Lua:GetEntity|GetEntity]]( int ) Every entity in the game has a unique ID number. Use the [[Lua:GetId|GetId]]() function to access this number for a particular entity.&lt;br /&gt;
*[[Lua:GetEntityByName|GetEntityByName]]( String )&lt;br /&gt;
*String [[Lua:GetClassName|GetClassName]]() Returns the entity type as a string.&lt;br /&gt;
===InfoScript===&lt;br /&gt;
An InfoScript is created by using the [[Lua:info_ff_script | info_ff_script]]:new() command in lua, and placing an info_ff_script in a map. This is usually a game item such as a flag, ball, or supply pack,&lt;br /&gt;
&lt;br /&gt;
The following commands will return an InfoScript:&lt;br /&gt;
*[[Lua:GetInfoScriptById|GetInfoScriptById]]( int )&lt;br /&gt;
*[[Lua:GetInfoScriptByName|GetInfoScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===TriggerScript===&lt;br /&gt;
This is similar to InfoScript, but it&amp;#039;s brush-based. Cap points and nobuild zones are Trigger scripts.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a TriggerScript:&lt;br /&gt;
*[[Lua:GetTriggerScriptByName|GetTriggerScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===CFFPlayer===&lt;br /&gt;
This refers to any client on the server. See [[:Category:Player_functions]] For a list of what you can do with CFFPlayer.&lt;br /&gt;
The following commands will return a CFFPlayer:&lt;br /&gt;
*[[Lua:GetPlayer|GetPlayer]]( entity ) --This would appear to do the same thing as CastToPlayer (see below). Use that instead.	&lt;br /&gt;
*[[Lua:GetPlayerByID|GetPlayerByID]]( int )&lt;br /&gt;
&lt;br /&gt;
===CFFTeam===&lt;br /&gt;
This refers to one of six teams--&amp;quot;Unassigned&amp;quot; and Spectators, in addition to Blue, Red, Yellow, and Green. See [[:Category:Team_functions]] For a list of what you can do with CFFTeam.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CFFTeam:&lt;br /&gt;
*[[Lua:GetTeam|GetTeam]]( teamId ) This returns a CFFTeam object when given a team number. See [[Lua:Flags#Team]].&lt;br /&gt;
===CFFBuildableObject===&lt;br /&gt;
Objects that the player can place or build. Includes dispensers, sentry guns, mancannons, and detpacks. See [[:Category:Buildable_functions]].&lt;br /&gt;
===CFFGrenadeBase===&lt;br /&gt;
Refers to thrown grenades&lt;br /&gt;
*[[Lua:GetGrenade|GetGrenade]]() TODO: what parameters does this take?&lt;br /&gt;
===CTakeDamageInfo===&lt;br /&gt;
Damageinfo is an object that&amp;#039;s passed along whenever a player is damaged or dies. By intercepting this object, you can detect events in the game, or change the outcome of those events. Damageinfo can be accessed from within the callbacks player_ondamage and player_killed. See [[:Category:Damageinfo_functions]].&lt;br /&gt;
&lt;br /&gt;
==Entity Checking==&lt;br /&gt;
Often in a lua script an entity will be passed to the script as a CBaseEntity. To gain access to more specific functions, we must &amp;#039;&amp;#039;cast&amp;#039;&amp;#039; the variable to a more specific type. But before casting to a more specific type of object, it&amp;#039;s usually necessary to verify that the object exists, and that it&amp;#039;s the kind of object we expect. Failing to do so can cause the script to fail and the game to crash.&lt;br /&gt;
&lt;br /&gt;
If these functions return &amp;#039;&amp;#039;true&amp;#039;&amp;#039;, it is safe to cast to that type of object.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsPlayer|IsPlayer]]( ent_id ) || used to see if a passed in entity is a player to before actions are performed on said player.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDispenser|IsDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsSentrygun|IsSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDetpack|IsDetpack]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsGrenade|IsGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsProjectile|IsProjectile]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsBuildable|IsBuildable]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsTurret|IsTurret]]( ent_id ) || Refers to respawn turrets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Casting Commands==&lt;br /&gt;
A casting function accepts a CBaseEntity and returns the requested type of object, which you can assign to a new variable.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToBeam|CastToBeam]]( ent_id ) || tries to cast the entity to a beam (to see if whatever triggered the event was a laser beam, a la SD2). If it fails, it returns null.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToPlayer|CastToPlayer]]( ent_id ) || used to cast the passed in entity to a player, often used for touch commands.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToInfoScript|CastToInfoScript]]( ent_id ) || This may be a flag, resupply pack, or the like.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerScript|CastToTriggerScript]]( ent_id ) || This may be any kind of brush trigger that&amp;#039;s referred to in an active lua script.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerClip|CastToTriggerClip]]( ent_id ) || Refers to a [[Lua:trigger_ff_clip|trigger_ff_clip]].&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToGrenade|CastToGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDispenser|CastToDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToSentrygun|CastToSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDetpack|CastToDetpack]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToBuildable|CastToBuildable]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToProjectile|CastToProjectile]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToJumpPad|CastToJumpPad]]( ent_id ) || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;--This callback runs when something explodes inside the trigger name detpack_trigger.&lt;br /&gt;
function detpack_trigger:onexplode( trigger_entity )&lt;br /&gt;
	--We want to know if this mysterious exploding CBaseEntity is a detpack. If not we can skip the rest.&lt;br /&gt;
	if IsDetpack( trigger_entity ) then&lt;br /&gt;
		local detpack = CastToDetpack( trigger_entity )&lt;br /&gt;
		--now that we have a detpack object, we can ask it what team it belongs to.&lt;br /&gt;
		if detpack:GetTeamId() == attackers then&lt;br /&gt;
			--This triggers a logic_relay in the map, which opens the hole and can trigger any other effect.&lt;br /&gt;
			OutputEvent( self.prefix .. &amp;quot;_detpack_relay&amp;quot;, &amp;quot;Trigger&amp;quot; )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--This line tells all grenades, etc. that it&amp;#039;s still OK to explode.&lt;br /&gt;
	return EVENT_ALLOWED&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10065</id>
		<title>Lua:Entity typing</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Lua:Entity_typing&amp;diff=10065"/>
		<updated>2015-04-05T20:51:10Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: /* Entity Checking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
Lua is a dynamically typed language--this means that a variable can hold any type of data at any time. C objects, such as those used in Fortress Forever, are accessed as blocks of raw data. Because altering these objects incorrectly can cause the game to crash, It&amp;#039;s important that the Lua system correctly knows what type of class it is dealing with.&lt;br /&gt;
&lt;br /&gt;
==FF Object Types==&lt;br /&gt;
===CBaseEntity===&lt;br /&gt;
This is the basic type from which all other entities are derived. Consequently there&amp;#039;s not a lot you can do with it--see [[:Category:Entity_functions]]. When naming an object of this type, it&amp;#039;s best to use the word &amp;quot;entity&amp;quot; to prevent confusion.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CBaseEntity:&lt;br /&gt;
*[[Lua:GetEntity|GetEntity]]( int ) Every entity in the game has a unique ID number. Use the [[Lua:GetId|GetId]]() function to access this number for a particular entity.&lt;br /&gt;
*[[Lua:GetEntityByName|GetEntityByName]]( String )&lt;br /&gt;
*String [[Lua:GetClassName|GetClassName]]() Returns the entity type as a string.&lt;br /&gt;
===InfoScript===&lt;br /&gt;
An InfoScript is created by using the [[Lua:info_ff_script | info_ff_script]]:new() command in lua, and placing an info_ff_script in a map. This is usually a game item such as a flag, ball, or supply pack,&lt;br /&gt;
&lt;br /&gt;
The following commands will return an InfoScript:&lt;br /&gt;
*[[Lua:GetInfoScriptById|GetInfoScriptById]]( int )&lt;br /&gt;
*[[Lua:GetInfoScriptByName|GetInfoScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===TriggerScript===&lt;br /&gt;
This is similar to InfoScript, but it&amp;#039;s brush-based. Cap points and nobuild zones are Trigger scripts.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a TriggerScript:&lt;br /&gt;
*[[Lua:GetTriggerScriptByName|GetTriggerScriptByName]]( String )&lt;br /&gt;
&lt;br /&gt;
===CFFPlayer===&lt;br /&gt;
This refers to any client on the server. See [[:Category:Player_functions]] For a list of what you can do with CFFPlayer.&lt;br /&gt;
The following commands will return a CFFPlayer:&lt;br /&gt;
*[[Lua:GetPlayer|GetPlayer]]( entity ) --This would appear to do the same thing as CastToPlayer (see below). Use that instead.	&lt;br /&gt;
*[[Lua:GetPlayerByID|GetPlayerByID]]( int )&lt;br /&gt;
&lt;br /&gt;
===CFFTeam===&lt;br /&gt;
This refers to one of six teams--&amp;quot;Unassigned&amp;quot; and Spectators, in addition to Blue, Red, Yellow, and Green. See [[:Category:Team_functions]] For a list of what you can do with CFFTeam.&lt;br /&gt;
&lt;br /&gt;
The following commands will return a CFFTeam:&lt;br /&gt;
*[[Lua:GetTeam|GetTeam]]( teamId ) This returns a CFFTeam object when given a team number. See [[Lua:Flags#Team]].&lt;br /&gt;
===CFFBuildableObject===&lt;br /&gt;
Objects that the player can place or build. Includes dispensers, sentry guns, mancannons, and detpacks. See [[:Category:Buildable_functions]].&lt;br /&gt;
===CFFGrenadeBase===&lt;br /&gt;
Refers to thrown grenades&lt;br /&gt;
*[[Lua:GetGrenade|GetGrenade]]() TODO: what parameters does this take?&lt;br /&gt;
===CTakeDamageInfo===&lt;br /&gt;
Damageinfo is an object that&amp;#039;s passed along whenever a player is damaged or dies. By intercepting this object, you can detect events in the game, or change the outcome of those events. Damageinfo can be accessed from within the callbacks player_ondamage and player_killed. See [[:Category:Damageinfo_functions]].&lt;br /&gt;
&lt;br /&gt;
==Entity Checking==&lt;br /&gt;
Often in a lua script an entity will be passed to the script as a CBaseEntity. To gain access to more specific functions, we must &amp;#039;&amp;#039;cast&amp;#039;&amp;#039; the variable to a more specific type. But before casting to a more specific type of object, it&amp;#039;s usually necessary to verify that the object exists, and that it&amp;#039;s the kind of object we expect. Failing to do so can cause the script to fail and the game to crash.&lt;br /&gt;
&lt;br /&gt;
If these functions return &amp;#039;&amp;#039;true&amp;#039;&amp;#039;, it is safe to cast to that type of object.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsPlayer|IsPlayer]]( ent_id ) || used to see if a passed in entity is a player to before actions are performed on said player.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDispenser|IsDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsSentrygun|IsSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsDetpack|IsDetpack]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsGrenade|IsGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsProjectile|IsProjectile]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsBuildable|IsBuildable]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:IsTurret|IsTurret]]( ent_id ) || Refers to respawn turrets.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Casting Commands==&lt;br /&gt;
A casting function accepts a CBaseEntity and returns the requested type of object, which you can assign to a new variable.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! LUA Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToBeam|CastToBeam]]( ent_id ) || tries to cast the entity to a beam (to see if whatever triggered the event was a laser beam, a la SD2). If it fails, it returns null.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToPlayer|CastToPlayer]]( ent_id ) || used to cast the passed in entity to a player, often used for touch commands.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToInfoScript|CastToInfoScript]]( ent_id ) || This may be a flag, resupply pack, or the like.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerScript|CastToTriggerScript]]( ent_id ) || This may be any kind of brush trigger that&amp;#039;s referred to in an active lua script.&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToTriggerClip|CastToTriggerClip]]( ent_id ) || Refers to a [[Lua:trigger_ff_clip|trigger_ff_clip]].&lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToGrenade|CastToGrenade]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDispenser|CastToDispenser]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToSentrygun|CastToSentrygun]]( ent_id ) || &lt;br /&gt;
|-&lt;br /&gt;
| [[Lua:CastToDetpack|CastToDetpack]]( ent_id ) || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;pre&amp;gt;--This callback runs when something explodes inside the trigger name detpack_trigger.&lt;br /&gt;
function detpack_trigger:onexplode( trigger_entity )&lt;br /&gt;
	--We want to know if this mysterious exploding CBaseEntity is a detpack. If not we can skip the rest.&lt;br /&gt;
	if IsDetpack( trigger_entity ) then&lt;br /&gt;
		local detpack = CastToDetpack( trigger_entity )&lt;br /&gt;
		--now that we have a detpack object, we can ask it what team it belongs to.&lt;br /&gt;
		if detpack:GetTeamId() == attackers then&lt;br /&gt;
			--This triggers a logic_relay in the map, which opens the hole and can trigger any other effect.&lt;br /&gt;
			OutputEvent( self.prefix .. &amp;quot;_detpack_relay&amp;quot;, &amp;quot;Trigger&amp;quot; )&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--This line tells all grenades, etc. that it&amp;#039;s still OK to explode.&lt;br /&gt;
	return EVENT_ALLOWED&lt;br /&gt;
end&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
	<entry>
		<id>https://www.fortress-forever.com/wiki/index.php?title=Category:Buildable_functions&amp;diff=10064</id>
		<title>Category:Buildable functions</title>
		<link rel="alternate" type="text/html" href="https://www.fortress-forever.com/wiki/index.php?title=Category:Buildable_functions&amp;diff=10064"/>
		<updated>2015-04-05T20:49:23Z</updated>

		<summary type="html">&lt;p&gt;R00Kie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox manual/Header}}&lt;br /&gt;
{{Infobox_mapping}}&lt;br /&gt;
These are functions that can be applied to machines built by players, such as sentry guns.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
CFFBuildableObject:&amp;#039;&amp;#039;function&amp;#039;&amp;#039;(&amp;#039;&amp;#039;parameters)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
CFFSentryGun:&amp;#039;&amp;#039;function&amp;#039;&amp;#039;(&amp;#039;&amp;#039;parameters)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
CFFDispener:&amp;#039;&amp;#039;function&amp;#039;&amp;#039;(&amp;#039;&amp;#039;parameters)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Probably mancannons and detpacks would apply here as well&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function player_killed ( player_victim, damageinfo )&lt;br /&gt;
&lt;br /&gt;
	-- if no damageinfo do nothing&lt;br /&gt;
	if not damageinfo then return end&lt;br /&gt;
&lt;br /&gt;
	-- Entity that is attacking&lt;br /&gt;
	local attacker = damageinfo:GetAttacker()&lt;br /&gt;
  &lt;br /&gt;
	-- If no attacker do nothing&lt;br /&gt;
	if not attacker then return end&lt;br /&gt;
&lt;br /&gt;
	elseif IsSentrygun(attacker) then&lt;br /&gt;
		attacker = CastToSentrygun(attacker)&lt;br /&gt;
		--attacker now refers to a CFFSentryGun object;&lt;br /&gt;
		--we can do sentry specific stuff, as well as general buildable stuff.&lt;br /&gt;
		player_attacker = attacker:GetOwner()&lt;br /&gt;
		--We now know who owns the sentry who killed this player&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CFFBuildableObject -- The basic form of buildable&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;2&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetTeamId&amp;#039;&amp;#039;&amp;#039;() || returns teamid of the buildable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetOwner&amp;#039;&amp;#039;&amp;#039;() || returns the player that built it. Not sure if this is a player object or entity.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetTeam&amp;#039;&amp;#039;&amp;#039;() || returns the team of the buildable.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
CFFSentryGun -- Sentrygun is a type of buildable, and inherits all of the above.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;2&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
! Command !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetLevel&amp;#039;&amp;#039;&amp;#039;() || Returns the level of the sentry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetLevel&amp;#039;&amp;#039;&amp;#039;(int level) || sets the level (does not play upgrade sounds)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Upgrade&amp;#039;&amp;#039;&amp;#039;() || upgrades to the next level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Repair&amp;#039;&amp;#039;&amp;#039;(int cells) || adds health based on the number of cells&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;AddAmmo&amp;#039;&amp;#039;&amp;#039;(int shells, int rockets) || adds ammo&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;RocketPosition&amp;#039;&amp;#039;&amp;#039;() || returns the Vector position of where rockets are fired from.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;MuzzlePosition&amp;#039;&amp;#039;&amp;#039;() || returns the Vector position of where bullets are fired from&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetRockets&amp;#039;&amp;#039;&amp;#039;() || number of rockets the SG has&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetShells&amp;#039;&amp;#039;&amp;#039;() || number of shells the SG has&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetHealth&amp;#039;&amp;#039;&amp;#039;() || amount of health the SG has&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetRockets&amp;#039;&amp;#039;&amp;#039;(int rockets) ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetShells&amp;#039;&amp;#039;&amp;#039;(int shells) ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetHealth&amp;#039;&amp;#039;&amp;#039;(int health) ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetMaxRockets&amp;#039;&amp;#039;&amp;#039;() ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetMaxShells&amp;#039;&amp;#039;&amp;#039;() ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetMaxHealth&amp;#039;&amp;#039;&amp;#039;() ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetFocusPoint&amp;#039;&amp;#039;&amp;#039;(Vector point) || sets where the SG wants to look&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetEnemy&amp;#039;&amp;#039;&amp;#039;() || gets the target of the SG (CBaseEntity)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SetEnemy&amp;#039;&amp;#039;&amp;#039;(CBaseEntity enemy) ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetVecAiming&amp;#039;&amp;#039;&amp;#039;() || gets the direction vector of the SG&amp;#039;s current aim direction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;GetVecGoal&amp;#039;&amp;#039;&amp;#039;() || gets the direction vector of the SG&amp;#039;s goal aim direction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Shoot&amp;#039;&amp;#039;&amp;#039;() || makes the SG shoot one shell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;ShootRocket&amp;#039;&amp;#039;&amp;#039;() || makes the SG shoot one rocket&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;br /&gt;
[[Category:Lua_Commands]]&lt;br /&gt;
{{Infobox manual/Footer}}&lt;/div&gt;</summary>
		<author><name>R00Kie</name></author>
	</entry>
</feed>