Difference between revisions of "Lua Commands"

From Fortress Forever Wiki
Jump to navigationJump to search
Line 52: Line 52:
 
*SetPlayerRespawnDelay
 
*SetPlayerRespawnDelay
  
Dealing with locations:
+
''Dealing with locations:''
 
*SetPlayerLocation
 
*SetPlayerLocation
 
*RemoveLocation
 
*RemoveLocation
  
Dealing with nobuild areas:
+
''Dealing with nobuild areas:''
 
*IsPlayerInNoBuild
 
*IsPlayerInNoBuild
 
*SetPlayerNoBuild
 
*SetPlayerNoBuild
Line 68: Line 68:
 
*SetTeamPlayerLimit
 
*SetTeamPlayerLimit
 
*[[LUA:SmartClassLimits|SmartClassLimits]]
 
*[[LUA:SmartClassLimits|SmartClassLimits]]
 +
 +
==Manipulating Grenades==
 +
*IsGrenade
 +
 +
''Dealing with nogren areas:''
 +
*IsGrenInNoGren
 +
*SetGrenNoGren
 +
*RemoveGrenNoGren
  
 
==Item/Flag related==
 
==Item/Flag related==
Line 81: Line 89:
 
*IncludeScript
 
*IncludeScript
 
*IsDispenser
 
*IsDispenser
 +
*IsObjectsOriginInWater
 +
*IsObjectsOriginInSlime
 
*IsSentrygun
 
*IsSentrygun
 
*PrecacheModel
 
*PrecacheModel

Revision as of 06:16, 18 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
  • SmartMessage
  • SmartSound
  • SmartTeamMessage
  • SmartTeamSound

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
  • IsPlayerFeetDeepInWater
  • IsPlayerUnderWater
  • IsPlayerWaistDeepInWater
  • MarkRadioTag
  • RemoveAmmo
  • RespawnAllPlayers
  • RespawnPlayer
  • SetPlayerDisguisable
  • SetPlayerRespawnDelay

Dealing with locations:

  • SetPlayerLocation
  • RemoveLocation

Dealing with nobuild areas:

  • IsPlayerInNoBuild
  • SetPlayerNoBuild
  • RemovePlayerNoBuild

Manipulating Teams

Manipulating Grenades

  • IsGrenade

Dealing with nogren areas:

  • IsGrenInNoGren
  • SetGrenNoGren
  • RemoveGrenNoGren

Item/Flag related

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

Misc

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

Map Location System