Difference between revisions of "Lua Commands"

From Fortress Forever Wiki
Jump to navigationJump to search
Line 49: Line 49:
 
==Manipulating Teams==
 
==Manipulating Teams==
 
*AddTeamScore
 
*AddTeamScore
 +
*IsTeam1AlliedToTeam2
 
*[[LUA:SetTeamAllies|SetTeamAllies]]
 
*[[LUA:SetTeamAllies|SetTeamAllies]]
 
*SetTeamClassLimit
 
*SetTeamClassLimit

Revision as of 09:38, 14 June 2006

Introduction

LUA Commands are functions LUA can use to call into game code to do something and usually return a result. These are also referred to as "entry points".

Communicating with player

  • BroadCastMessage
  • BroadCastMessageToPlayer
  • BroadCastSound
  • BroadCastSoundToPlayer
  • ConsoleToAll
  • EmitSound

Interfacing with map entities

  • CloseDoor
  • FireOutput
  • LockButton
  • LockDoor
  • OpenDoor
  • PressButton
  • ToggleDoor
  • SpawnEntityAtPlayer
  • UnlockButton
  • UnlockDoor
  • UseEntity

Finding Information about the Players

  • GetPlayer
  • GetPlayerClass
  • GetPlayerOnTeam
  • GetPlayerName
  • GetPlayerTeam
  • NumPlayers
  • NumPlayersOnTeam

Manipulating Players

  • AddAmmo
  • AddFrags
  • AddHealth
  • AddArmor
  • IsPlayer
  • MarkRadioTag
  • RemoveAmmo
  • RespawnAllPlayers
  • RespawnPlayer
  • SetPlayerLocation
  • RemoveLocation
  • SetPlayerDisguisable
  • SetPlayerRespawnDelay

Manipulating Teams

  • AddTeamScore
  • IsTeam1AlliedToTeam2
  • SetTeamAllies
  • SetTeamClassLimit
  • SetTeamPlayerLimit

Item/Flag related

  • DropItem
  • Pickup
  • PlayerHasItem
  • RemoveItem
  • Respawn
  • ReturnItem

Misc

  • GetObjectsTeam
  • IncludeScript
  • IsDispenser
  • IsSentrygun
  • PrecacheModel
  • PrecacheSound
  • Random / rand
  • SetGlobalRespawnDelay
  • SetModel

Map Location System