Difference between revisions of "Category:Utility functions"
From Fortress Forever Wiki
Jump to navigationJump to search (New page: These lua functions are useful for getting your scripts working. Category:Lua_Commands) |
|||
| Line 1: | Line 1: | ||
| + | {{Infobox manual/Header}} | ||
| + | {{Infobox mapping}} | ||
These lua functions are useful for getting your scripts working. | These lua functions are useful for getting your scripts working. | ||
| − | [[ | + | {| border="0" cellspacing="0" |
| + | ! General Technical Functions !! Description | ||
| + | |- | ||
| + | | [[Lua:ConsoleToAll|ConsoleToAll]]( message ) || sends a message to server console. Inaccurately named--players will not see this. | ||
| + | |- | ||
| + | | [[Lua:PrecacheModel|PrecacheModel]]( modelfile ) || loads a given model into memory for use later. | ||
| + | |- | ||
| + | | [[Lua:PrecacheSound|PrecacheSound]]( soundfile ) || as above. | ||
| + | |- | ||
| + | | PrintBool , &FFLib::PrintBool || | ||
| + | |- | ||
| + | | [[Lua:RandomFloat|RandomFloat]]( min, max ) || generates a random float. | ||
| + | |- | ||
| + | | [[Lua:RandomInt|RandomInt]]( min, max ) || generates a random integer | ||
| + | |- | ||
| + | | [[Lua:RemoveEntity|RemoveEntity]]( ent_id ) || removes entity. | ||
| + | |- | ||
| + | ! Player information !! | ||
| + | |- | ||
| + | | [[Lua:GetPacketloss|GetPacketloss]]( playerentity ) || gets a player's packet loss. Woo? | ||
| + | |- | ||
| + | | [[Lua:GetPing|GetPing]]( playerentity ) || | ||
| + | |- | ||
| + | | [[Lua:GetSteamID|GetSteamID]]( playerentity ) || | ||
| + | |- | ||
| + | ! Server Info !! | ||
| + | |- | ||
| + | | [[Lua:GetServerTime|GetServerTime]]() || | ||
| + | |- | ||
| + | | [[Lua:AreTeamsAllied|AreTeamsAllied]]( team1, team2 ) || Returns true if they are. | ||
| + | |- | ||
| + | | [[Lua:NumPlayers|NumPlayers]]() || gets the number of players. | ||
| + | |- | ||
| + | ! Server Effects !! | ||
| + | |- | ||
| + | | [[Lua:SetGameDescription|SetGameDescription]]( name ) || Changes what appears in the game column of the server browser (it is appended to "FF ") | ||
| + | For use in [[startup]](). | ||
| + | |- | ||
| + | | [[Lua:RespawnAllPlayers|RespawnAllPlayers]]( ) || Respawns everyone immediately. | ||
| + | |- | ||
| + | | [[Lua:KillAndRespawnAllPlayers|KillAndRespawnAllPlayers]]() || obvious! | ||
| + | |- | ||
| + | | [[Lua:GoToIntermission|GoToIntermission]]( ) || Sends all players to the info_intermission entity and shows them the scoreboard. Then, the map ends. | ||
| + | |- | ||
| + | | [[Lua:ResetMap|ResetMap]]() || resets map. | ||
| + | |- | ||
| + | | [[Lua:SetGlobalRespawnDelay|SetGlobalRespawnDelay]]( time ) || enforces a respawn delay. | ||
| + | |- | ||
| + | | [[Lua:SetConvar|SetConvar]]( player, var, value ) || sets a players console variable to set value | ||
| + | |- | ||
| + | | [[Lua:ApplyToAll|ApplyToAll]]( effect ) || | ||
| + | |- | ||
| + | | [[Lua:ApplyToTeam|ApplyToTeam]]( effect, team ) || | ||
| + | |- | ||
| + | | [[Lua:ApplyToPlayer|ApplyToPlayer]]( effect, player ) || | ||
| + | |- | ||
| + | | [[Lua:HasGameStarted|HasGameStarted]]( ) || Returns false if the map is in prematch mode. | ||
| + | |- | ||
| + | | [[Lua:GetConvar|GetConvar]]( cvar ) || checks the value of a console variable (cvar) | ||
| + | |- | ||
| + | ! Game Rules !! | ||
| + | |- | ||
| + | | [[Lua:SetPlayerLimit|SetPlayerLimit]]( team , # ) || used to set player limit per team. | ||
| + | |- | ||
| + | | [[Lua:SetPlayerLimits|SetPlayerLimits]]( #, # ) || | ||
| + | |- | ||
| + | | [[Lua:SmartClassLimits|SmartClassLimits]]( team, #scout, #sniper, #soldier, #demoman, #medic, #hwguy, #pyro, #spy, #engineer, #civilian ) || sets class limits for the entire team. | ||
| + | |- | ||
| + | | [[Lua:SetTeamAllies|SetTeamAllies]]( team , bits ) || used to ally one team to another. | ||
| + | |- | ||
| + | | [[Lua:SetTeamClassLimit|SetTeamClassLimit]]( team, class, limit ) || | ||
| + | |- | ||
| + | | [[Lua:SetTeamName|SetTeamName]]( team, name ) || | ||
| + | |- | ||
| + | | [[Lua:SetTeamPlayerLimit|SetTeamPlayerLimit]]( team, limit ) || | ||
| + | |- | ||
| + | | [[Lua:SetTeamPlayerLimit|SetTeamPlayerLimit]]( team, limit ) || | ||
| + | |} | ||
| + | {{Infobox manual/Footer}} | ||
Revision as of 10:40, 5 May 2010
|
These lua functions are useful for getting your scripts working.
|
Pages in category "Utility functions"
The following 7 pages are in this category, out of 7 total.