# Class `Objects.LaraObject`

Class for extra Lara-only functions.

Do not try to create an object of this type; use the built-in Lara variable instead.

In addition, LaraObject inherits all the functions of Moveable.

## Functions

LaraObject:SetPoison([Poison]) | Set Lara poison
LaraObject:GetPoison() | Get poison potency of Lara
LaraObject:SetAir(Air) | Set air value of Lara
LaraObject:GetAir() | Get air value of Lara
LaraObject:SetWet(Wetness) | Set wetness value of Lara (causes dripping)
LaraObject:GetWet() | Get wetness value of Lara
LaraObject:SetStamina(stamina) | Set sprint energy value of Lara
LaraObject:GetStamina() | Get stamina value of Lara
Moveable:GetAirborne() | Get the moveable's airborne status
Moveable:SetAirborne(New) | Set the moveable's airborne status
LaraObject:UndrawWeapon() | Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.
LaraObject:ThrowAwayTorch() | Lara will throw away the torch if she currently holds one in her hand.
LaraObject:GetHandStatus() | Get actual hand status of Lara
LaraObject:GetWeaponType() | Get actual weapon type of Lara
LaraObject:SetWeaponType(weaponType, activate) | Set Lara weapon type
LaraObject:GetAmmoType() | Get player weapon ammo type.
LaraObject:GetAmmoCount() | Get current weapon's ammo count
LaraObject:GetVehicle() | Get current vehicle, if it exists
LaraObject:GetTarget() | Get the player's current targeted moveable (if it exists).
LaraObject:GetInteractedMoveable() | Get the player's current interacted moveable (if it exists).
LaraObject:TorchIsLit() | Get current light state of the torch, if it exists

## Functions

LaraObject:SetPoison([Poison])
  Set Lara poison

  ### Parameters:

  - Poison int ; maximum value is 128 (default 0) (optional)

  ### Usage:

      Lara:SetPoison(10)

LaraObject:GetPoison()
  Get poison potency of Lara

  ### Returns:

  int current poison potency

  ### Usage:

      local poisonPotency = Lara:GetPoison()

LaraObject:SetAir(Air)
  Set air value of Lara

  ### Parameters:

  - Air int value to give Lara. Maximum value is 1800.

  ### Usage:

      Lara:SetAir(100)

LaraObject:GetAir()
  Get air value of Lara

  ### Returns:

  int current air value

  ### Usage:

      local currentAir = Lara:GetAir()

LaraObject:SetWet(Wetness)
  Set wetness value of Lara (causes dripping)

  ### Parameters:

  - Wetness int value. Maximum 255

  ### Usage:

      Lara:SetWet(100)

LaraObject:GetWet()
  Get wetness value of Lara

  ### Returns:

  int current wetness value

  ### Usage:

      local dripAmount = Lara:GetWet()

LaraObject:SetStamina(stamina)
  Set sprint energy value of Lara

  ### Parameters:

  - stamina int to give to Lara; maximum value is 120.

  ### Usage:

      Lara:SetStamina(120)

LaraObject:GetStamina()
  Get stamina value of Lara

  ### Returns:

  int current sprint value

  ### Usage:

      local sprintEnergy = Lara:GetStamina()

Moveable:GetAirborne()
  Get the moveable's airborne status

  ### Returns:

  (bool) true if Lara state must react to aerial forces.
Moveable:SetAirborne(New)
  Set the moveable's airborne status

  ### Parameters:

  - New (bool) airborn status for Lara.
LaraObject:UndrawWeapon()
  Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.

  ### Usage:

      Lara:UndrawWeapon()

LaraObject:ThrowAwayTorch()
  Lara will throw away the torch if she currently holds one in her hand.

  ### Usage:

      Lara:ThrowAwayTorch()

LaraObject:GetHandStatus()
  Get actual hand status of Lara

  ### Returns:

  int hand status 0=HandsFree, 1=Busy(climbing,etc), 2=WeaponDraw, 3=WeaponUndraw, 4=WeaponInHand.

  ### Usage:

      local handStatus = Lara:GetHandStatus()

LaraObject:GetWeaponType()
  Get actual weapon type of Lara

  ### Returns:

  Flow.WeaponType current weapon type.

  ### Usage:

      local weaponType = Lara:GetWeaponType()

LaraObject:SetWeaponType(weaponType, activate)
  Set Lara weapon type

  ### Parameters:

  - weaponType Flow.WeaponType
  - activate bool if `true`, also draw the weapons or set torch lit. If `false`, keep weapons holstered or leave torch unlit.

  ### Usage:

      Lara:SetWeaponType(WeaponType.PISTOLS, false)

LaraObject:GetAmmoType()
  Get player weapon ammo type.

  ### Returns:

  Flow.AmmoType player weapon ammo type

  ### Usage:

      local CurrentAmmoType = Lara:GetAmmoType()

LaraObject:GetAmmoCount()
  Get current weapon's ammo count

  ### Returns:

  int current ammo count (-1 if infinite)

  ### Usage:

      local equippedWeaponAmmoLeft = Lara:GetAmmoCount()

LaraObject:GetVehicle()
  Get current vehicle, if it exists

  ### Returns:

  Moveable current vehicle (nil if no vehicle present)

  ### Usage:

      local vehicle = Lara:GetVehicle()

LaraObject:GetTarget()
  Get the player's current targeted moveable (if it exists).

  ### Returns:

  Moveable Target moveable (nil if the player is not currently targeting a moveable).

  ### Usage:

      local target = Lara:GetTarget()

LaraObject:GetInteractedMoveable()
  Get the player's current interacted moveable (if it exists).

  ### Returns:

  Moveable Interacted moveable (nil if the player is not interacting with a moveable).

  ### Usage:

      local interactedMoveable = Lara:GetInteractedMoveable()

LaraObject:TorchIsLit()
  Get current light state of the torch, if it exists

  ### Returns:

  bool is torch currently lit or not? (false if no torch exists)

  ### Usage:

      local torchIsLit = Lara:TorchIsLit()

generated by TEN-LDoc (a fork of LDoc 1.4.6)