Difference between revisions of "Category:Global Callbacks"

From Fortress Forever Wiki
Jump to navigationJump to search
m
 
(8 intermediate revisions by 3 users not shown)
Line 21: Line 21:
  
 
==A short list==
 
==A short list==
 +
This list needs a LOT of work!
 
*[[Lua:Effect-triggered callbacks]]
 
*[[Lua:Effect-triggered callbacks]]
 
*[[Lua:Flaginfo]]
 
*[[Lua:Flaginfo]]
 
*[[Lua:Startup]]
 
*[[Lua:Startup]]
 +
*[[Lua:shutdown]]() Calls right before map change.
 
*[[Lua:Tick]]
 
*[[Lua:Tick]]
 +
*[[buildable_killed]] ( buildable, damageinfo )
 
*[[Lua:player killed]]
 
*[[Lua:player killed]]
 
*[[Lua:player ondamage]]
 
*[[Lua:player ondamage]]
 
*[[Lua:player spawn]]
 
*[[Lua:player spawn]]
*[[player_onchat]]
+
*[[player_onchat]]( player, chatstring ) Return false to prevent the chat message from being sent to others
 
*[[Lua:precache]]
 
*[[Lua:precache]]
 
*[[Player onkill]]
 
*[[Player onkill]]
 
*[[Player switchteam]]
 
*[[Player switchteam]]
*[[Player throwgren1]]
+
*[[player_onthrowgren1]]
*[[Player throwgren2]]
+
*[[player_onthrowgren2]]
 +
*[[player_onuse]] ( player )
 +
*[[player_canconnect]]( playername, address, entindex ) Called when a player tries to join the server. Return false to prevent the player from joining.
 +
*[[player_connected]]( player ) Called when a player successfully joins the server
 +
*[[player_disconnected]]( player )
 
*[[Category:Lua]][[Category:Lua_Callbacks]]
 
*[[Category:Lua]][[Category:Lua_Callbacks]]

Latest revision as of 01:39, 4 July 2017

Mapping for FF
The Basics

Setting up Hammer
Getting Started With Lua
Releasing a map

FF-specific Entities

Lua location system

Map Templates
FF Lua Documentation

Entity Typing
Entity Collections

Commands
Callbacks

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.

Example

function startup()
	-- set up team limits
	local team = GetTeam( Team.kBlue )
	team:SetPlayerLimit( 0 )

	team = GetTeam( Team.kRed )
	team:SetPlayerLimit( 0 )

	team = GetTeam( Team.kYellow )
	team:SetPlayerLimit( -1 )

	team = GetTeam( Team.kGreen )
	team:SetPlayerLimit( -1 )
end

A short list

This list needs a LOT of work!

Pages in category "Global Callbacks"

The following 3 pages are in this category, out of 3 total.