Baldi's Basics Plus Glue API
Modding API for Baldi's Basics Plus
Loading...
Searching...
No Matches
BBPGlue.API.BBPPlayer Class Referencesealed

High-level access to the current player instance and player-related settings. More...

Public Member Functions

void AddStamina (float value, bool limited=true)
 Adds stamina to the player; limited controls whether addition respects caps.
void AddTimeScale (object timeScaleModifier)
 Adds a time scale modifier object to the player.
void ClearGuilt ()
 Clears the player's guilt state.
Component? GetComponent (string className)
 Retrieves a player component by class name.
void Refresh ()
 Refreshes internal cached references to the player.
void RemoveTimeScale (object timeScaleModifier)
 Removes a previously added time scale modifier.
void Reverse ()
 Reverses the player's movement or facing state (game-specific).
void RuleBreak (string rule, float linger)
 Triggers a rule break for the player with a linger time.
void RuleBreak (string rule, float linger, float sensitivity)
 Triggers a rule break with an explicit sensitivity parameter.
void SetHidden (bool hidden)
 Sets the player's hidden state.
void SetNametag (bool state)
 Shows or hides the player's nametag.
void Teleport (Vector3 position)
 Teleports the player to the specified position.

Properties

float BaseReach [get, set]
 The base reach value before modifiers.
TransformCameraBase [get]
 Base transform used for the player camera.
GameObjectClickedThisFrame [get]
 The GameObject that was clicked this frame, if any.
object? CurrentClickable [get]
 The current clickable object under the player's cursor, if any.
bool Disobeying [get]
 Whether the player is currently disobeying rules.
BBPEntity Entity [get]
 The player entity wrapper.
object? EnvironmentController [get]
 Low-level controller managing environment interactions for the player.
bool Exists [get]
 Whether a player component currently exists in the game context.
float FrameVelocity [get]
 Velocity recorded during the current frame.
GameObject? GameObject [get]
 The Unity GameObject for the player, if present.
float GuiltSensitivity [get]
 The player's guilt sensitivity multiplier.
float Height [get, set]
 The player's collider height used by movement logic.
bool Invincible [get, set]
 Gets or sets whether the player is invincible.
bool Invisible [get]
 Whether the player is invisible.
object? ItemManager [get]
 Internal item manager reference.
float MaxHideableLightLevel [get]
 Maximum light level below which the player can hide.
object? Movement [get]
 Shortcut reference to the movement controller (same as PlayerMovement).
BBPEntity MovementEntity [get]
 The entity wrapper corresponding to the movement controller.
object? PlayerClick [get]
 Player click/input helper object.
object? PlayerMovement [get]
 Low-level player movement controller object.
int PlayerNumber [get, set]
 The numeric player index used by the game.
float PlayerTimeScale [get]
 The player's time scale modifier.
Vector3 Position [get, set]
 World position of the player.
Component? Raw [get]
 The raw Unity Component representing the player, if available.
float Reach [get]
 Current effective interaction reach distance.
float RealVelocity [get]
 Current real velocity reported by the movement controller.
bool Reversed [get, set]
 Whether the player is reversed (game-specific meaning).
Quaternion Rotation [get, set]
 The player's rotation.
string RuleBreakText [get, set]
 Text describing the player's last rule break.
float RunSpeed [get, set]
 Movement run speed value.
bool SeesClickable [get]
 Whether the player currently sees a clickable object.
float Stamina [get, set]
 Current stamina value.
float StaminaDrop [get, set]
 Rate at which stamina drops while running.
float StaminaMax [get]
 Maximum stamina available to the player.
float StaminaRise [get, set]
 Rate at which stamina recovers.
bool Tagged [get]
 Whether the player is currently tagged.
Transform? Transform [get]
 The Unity Transform of the player, if present.
float WalkSpeed [get, set]
 Movement walk speed value.

Detailed Description

High-level access to the current player instance and player-related settings.

Member Function Documentation

◆ AddStamina()

void BBPGlue.API.BBPPlayer.AddStamina ( float value,
bool limited = true )

Adds stamina to the player; limited controls whether addition respects caps.

Parameters
valueAmount of stamina to add.
limitedWhether addition should respect stamina caps.

◆ AddTimeScale()

void BBPGlue.API.BBPPlayer.AddTimeScale ( object timeScaleModifier)

Adds a time scale modifier object to the player.

Parameters
timeScaleModifierModifier object understood by the game.

◆ ClearGuilt()

void BBPGlue.API.BBPPlayer.ClearGuilt ( )

Clears the player's guilt state.

◆ GetComponent()

Component? BBPGlue.API.BBPPlayer.GetComponent ( string className)

Retrieves a player component by class name.

Parameters
classNameThe fully-qualified class name to look up.
Returns
The component instance or null.

◆ Refresh()

void BBPGlue.API.BBPPlayer.Refresh ( )

Refreshes internal cached references to the player.

◆ RemoveTimeScale()

void BBPGlue.API.BBPPlayer.RemoveTimeScale ( object timeScaleModifier)

Removes a previously added time scale modifier.

Parameters
timeScaleModifierModifier object to remove.

◆ Reverse()

void BBPGlue.API.BBPPlayer.Reverse ( )

Reverses the player's movement or facing state (game-specific).

◆ RuleBreak() [1/2]

void BBPGlue.API.BBPPlayer.RuleBreak ( string rule,
float linger )

Triggers a rule break for the player with a linger time.

Parameters
ruleIdentifier of the rule broken.
lingerHow long the rule break lingers.

◆ RuleBreak() [2/2]

void BBPGlue.API.BBPPlayer.RuleBreak ( string rule,
float linger,
float sensitivity )

Triggers a rule break with an explicit sensitivity parameter.

Parameters
ruleIdentifier of the rule broken.
lingerHow long the rule break lingers.
sensitivityGuilt sensitivity override.

◆ SetHidden()

void BBPGlue.API.BBPPlayer.SetHidden ( bool hidden)

Sets the player's hidden state.

Parameters
hiddenTrue to hide the player; false to show.

◆ SetNametag()

void BBPGlue.API.BBPPlayer.SetNametag ( bool state)

Shows or hides the player's nametag.

Parameters
stateTrue to show the nametag; false to hide it.

◆ Teleport()

void BBPGlue.API.BBPPlayer.Teleport ( Vector3 position)

Teleports the player to the specified position.

Parameters
positionDestination position.

Property Documentation

◆ BaseReach

float BBPGlue.API.BBPPlayer.BaseReach
getset

The base reach value before modifiers.

◆ CameraBase

Transform? BBPGlue.API.BBPPlayer.CameraBase
get

Base transform used for the player camera.

◆ ClickedThisFrame

GameObject? BBPGlue.API.BBPPlayer.ClickedThisFrame
get

The GameObject that was clicked this frame, if any.

◆ CurrentClickable

object? BBPGlue.API.BBPPlayer.CurrentClickable
get

The current clickable object under the player's cursor, if any.

◆ Disobeying

bool BBPGlue.API.BBPPlayer.Disobeying
get

Whether the player is currently disobeying rules.

◆ Entity

BBPEntity BBPGlue.API.BBPPlayer.Entity
get

The player entity wrapper.

◆ EnvironmentController

object? BBPGlue.API.BBPPlayer.EnvironmentController
get

Low-level controller managing environment interactions for the player.

◆ Exists

bool BBPGlue.API.BBPPlayer.Exists
get

Whether a player component currently exists in the game context.

◆ FrameVelocity

float BBPGlue.API.BBPPlayer.FrameVelocity
get

Velocity recorded during the current frame.

◆ GameObject

GameObject? BBPGlue.API.BBPPlayer.GameObject
get

The Unity GameObject for the player, if present.

◆ GuiltSensitivity

float BBPGlue.API.BBPPlayer.GuiltSensitivity
get

The player's guilt sensitivity multiplier.

◆ Height

float BBPGlue.API.BBPPlayer.Height
getset

The player's collider height used by movement logic.

◆ Invincible

bool BBPGlue.API.BBPPlayer.Invincible
getset

Gets or sets whether the player is invincible.

◆ Invisible

bool BBPGlue.API.BBPPlayer.Invisible
get

Whether the player is invisible.

◆ ItemManager

object? BBPGlue.API.BBPPlayer.ItemManager
get

Internal item manager reference.

◆ MaxHideableLightLevel

float BBPGlue.API.BBPPlayer.MaxHideableLightLevel
get

Maximum light level below which the player can hide.

◆ Movement

object? BBPGlue.API.BBPPlayer.Movement
get

Shortcut reference to the movement controller (same as PlayerMovement).

◆ MovementEntity

BBPEntity BBPGlue.API.BBPPlayer.MovementEntity
get

The entity wrapper corresponding to the movement controller.

◆ PlayerClick

object? BBPGlue.API.BBPPlayer.PlayerClick
get

Player click/input helper object.

◆ PlayerMovement

object? BBPGlue.API.BBPPlayer.PlayerMovement
get

Low-level player movement controller object.

◆ PlayerNumber

int BBPGlue.API.BBPPlayer.PlayerNumber
getset

The numeric player index used by the game.

◆ PlayerTimeScale

float BBPGlue.API.BBPPlayer.PlayerTimeScale
get

The player's time scale modifier.

◆ Position

Vector3 BBPGlue.API.BBPPlayer.Position
getset

World position of the player.

Setting moves the player's transform.

◆ Raw

Component? BBPGlue.API.BBPPlayer.Raw
get

The raw Unity Component representing the player, if available.

◆ Reach

float BBPGlue.API.BBPPlayer.Reach
get

Current effective interaction reach distance.

◆ RealVelocity

float BBPGlue.API.BBPPlayer.RealVelocity
get

Current real velocity reported by the movement controller.

◆ Reversed

bool BBPGlue.API.BBPPlayer.Reversed
getset

Whether the player is reversed (game-specific meaning).

◆ Rotation

Quaternion BBPGlue.API.BBPPlayer.Rotation
getset

The player's rotation.

Setting updates the transform's rotation.

◆ RuleBreakText

string BBPGlue.API.BBPPlayer.RuleBreakText
getset

Text describing the player's last rule break.

◆ RunSpeed

float BBPGlue.API.BBPPlayer.RunSpeed
getset

Movement run speed value.

◆ SeesClickable

bool BBPGlue.API.BBPPlayer.SeesClickable
get

Whether the player currently sees a clickable object.

◆ Stamina

float BBPGlue.API.BBPPlayer.Stamina
getset

Current stamina value.

◆ StaminaDrop

float BBPGlue.API.BBPPlayer.StaminaDrop
getset

Rate at which stamina drops while running.

◆ StaminaMax

float BBPGlue.API.BBPPlayer.StaminaMax
get

Maximum stamina available to the player.

◆ StaminaRise

float BBPGlue.API.BBPPlayer.StaminaRise
getset

Rate at which stamina recovers.

◆ Tagged

bool BBPGlue.API.BBPPlayer.Tagged
get

Whether the player is currently tagged.

◆ Transform

Transform? BBPGlue.API.BBPPlayer.Transform
get

The Unity Transform of the player, if present.

◆ WalkSpeed

float BBPGlue.API.BBPPlayer.WalkSpeed
getset

Movement walk speed value.


The documentation for this class was generated from the following file: