Difference between revisions of "Category:Lua Commands"
Line 3: | Line 3: | ||
LUA commands that are specific for Fortress Forever. This list is incomplete and will be replaced eventually, and everything put into categories. | LUA commands that are specific for Fortress Forever. This list is incomplete and will be replaced eventually, and everything put into categories. | ||
+ | =Global Functions= | ||
+ | Global functions are not confined to any object type. They can be called alone, from just about anywhere in the script. | ||
+ | |||
+ | '''Example:''' | ||
+ | local player = CastToPlayer( player_entity ) | ||
+ | AddHudTimer(player, "timer", 300, -1, 0, 70, 4) | ||
+ | This global function is not a player function, though it takes a player object as a parameter. | ||
== Casting Commands == | == Casting Commands == | ||
These functions cast game objects into different data types. See [[Lua:Entity_typing]] | These functions cast game objects into different data types. See [[Lua:Entity_typing]] | ||
Line 29: | Line 36: | ||
==Entity Checks== | ==Entity Checks== | ||
− | These commands are used to check if | + | These commands are used to check if the specified entity is a game entity of a specific type. |
{| border="1" cellspacing="0" | {| border="1" cellspacing="0" | ||
Line 75: | Line 82: | ||
| [[Lua:SpeakTeam|SpeakTeam]] || | | [[Lua:SpeakTeam|SpeakTeam]] || | ||
|} | |} | ||
− | |||
==Schedules== | ==Schedules== | ||
Line 103: | Line 109: | ||
| [[Lua:AddHudIconToAll|AddHudIconToAll]]( HudIconType, NameOfHudUcon, X, Y, W, H, A ) || adds HUD icon to all players like those used for flag info. | | [[Lua:AddHudIconToAll|AddHudIconToAll]]( HudIconType, NameOfHudUcon, X, Y, W, H, A ) || adds HUD icon to all players like those used for flag info. | ||
|- | |- | ||
− | | [[Lua:AddHudText|AddHudText]] || | + | | [[Lua:AddHudText|AddHudText]] || Puts a bit of text on the screen. |
|- | |- | ||
| [[Lua:AddHudTextToAll|AddHudTextToAll]] || | | [[Lua:AddHudTextToAll|AddHudTextToAll]] || | ||
|- | |- | ||
− | | [[Lua:AddHudTimer|AddHudTimer]] || | + | | [[Lua:AddHudTimer|AddHudTimer]] || Puts a countdown timer on the screen. |
|- | |- | ||
| [[Lua:AddHudTimerToAll|AddHudTimerToAll]] || | | [[Lua:AddHudTimerToAll|AddHudTimerToAll]] || | ||
Line 114: | Line 120: | ||
|- | |- | ||
| [[Lua:RemoveHudItemFromAll|RemoveHudItemFromAll]] || | | [[Lua:RemoveHudItemFromAll|RemoveHudItemFromAll]] || | ||
+ | |} | ||
+ | |||
+ | ==Objective Icons== | ||
+ | Objective icons help guide the player to where they are supposed to be. | ||
+ | |||
+ | {| border="1" cellspacing="0" | ||
+ | ! LUA Command !! Description | ||
+ | |- | ||
+ | | [[Lua:UpdateObjectiveIcon|UpdateObjectiveIcon]](player, entity)|| sets player's objective to this entity. | ||
+ | |- | ||
+ | | [[Lua:UpdateTeamObjectiveIcon|UpdateTeamObjectiveIcon]](team, entity)|| sets a team's objective to this entity. | ||
|} | |} | ||
Line 208: | Line 225: | ||
| [[Lua:SetTeamPlayerLimit|SetTeamPlayerLimit]]( team, limit ) || | | [[Lua:SetTeamPlayerLimit|SetTeamPlayerLimit]]( team, limit ) || | ||
|} | |} | ||
+ | |||
+ | =Object functions= | ||
+ | Each class of entity will have its own set of functions. These are listed in the links below: | ||
+ | * [[:Category:Buildable_functions|Buildable]] -- Sentries, dispensers, etc. | ||
+ | * [[:Category:Damageinfo functions|Damageinfo]]-- An object that is created every time someone/something gets hurt in the game. | ||
+ | * [[Lua:info_ff_script|info_ff_script]] -- A generic game object. These are most often used as flags or other objectives. | ||
+ | * [[:Category:Player functions|Player]] -- Anyone that's connected to a server. | ||
+ | * [[:Category:Team functions|Team]] -- A team is a group of folks who don't like other groups of folks. | ||
[[Category:Lua]] | [[Category:Lua]] | ||
{{Infobox manual/Footer}} | {{Infobox manual/Footer}} |
Revision as of 18:16, 10 July 2009
LUA commands that are specific for Fortress Forever. This list is incomplete and will be replaced eventually, and everything put into categories. Global FunctionsGlobal functions are not confined to any object type. They can be called alone, from just about anywhere in the script. Example: local player = CastToPlayer( player_entity ) AddHudTimer(player, "timer", 300, -1, 0, 70, 4) This global function is not a player function, though it takes a player object as a parameter. Casting CommandsThese functions cast game objects into different data types. See Lua:Entity_typing
Entity ChecksThese commands are used to check if the specified entity is a game entity of a specific type.
Player messaging and soundsthese are used to send text messages and sounds to players.
SchedulesSchedules are a way to delay the effects of a script for a specific length of time.
HUD ItemsThrough Lua, a map can display information on a player's screen.
Objective IconsObjective icons help guide the player to where they are supposed to be.
Other Commandsother misc commands not lumped into any group as of yet.
Object functionsEach class of entity will have its own set of functions. These are listed in the links below:
|
Subcategories
This category has the following 11 subcategories, out of 11 total.
Pages in category "Lua Commands"
The following 41 pages are in this category, out of 41 total.
L
- Lua Commands
- Lua:BroadCastMessage
- Lua:BroadCastMessageToPlayer
- Lua:BroadCastSound
- Lua:BroadCastSoundToPlayer
- Lua:Commands
- Lua:ConsoleToAll
- Lua:DisplayMessage
- Lua:Functions
- Lua:HasGameStarted
- Lua:IncludeScript
- Lua:info ff script
- Lua:IsDispenser
- Lua:IsGrenade
- Lua:IsGrenInNoGren
- Lua:IsPlayer
- Lua:IsPlayerInNoBuild
- Lua:IsSentrygun
- Lua:Menus
- Lua:OutputEvent
- Lua:PrecacheModel
- Lua:PrecacheSound
- Lua:RandomFlagTouchSpeak
- Lua:RandomFloat
- Lua:RandomInt
- Lua:SetTeamAllies
- Lua:SetTeamClassLimit
- Lua:SetTeamName
- Lua:SetTeamPlayerLimit
- Lua:SmartClassLimits
- Lua:SmartMessage
- Lua:SmartSound
- Lua:SmartSpeak
- Lua:SmartTeamMessage
- Lua:SmartTeamSound
- Lua:SmartTeamSpeak
- Lua:SpeakAll
- Lua:SpeakPlayer
- Lua:UpdateObjectiveIcon
- Lua:UpdateTeamObjectiveIcon