From Fortress Forever WikiJump to navigationJump to search
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.
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!
- Lua:Effect-triggered callbacks
- Lua:shutdown() Calls right before map change.
- buildable_killed ( buildable, damageinfo )
- Lua:player killed
- Lua:player ondamage
- Lua:player spawn
- player_onchat( player, chatstring ) Return false to prevent the chat message from being sent to others
- Player onkill
- Player switchteam
- 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 )