Skip to content

Functions

BenevolusGoat edited this page Jan 27, 2025 · 1 revision

All functions available under the library to be used outside the library itself


StatusEffectLibrary:GetStatusEffects(Entity ent): StatusEffects

Returns a table of data on all custom status effects on the entity. Can potentially be no effects.

  • ent: The entity meant to house the data

StatusEffectLibrary:GetStatusEffectData(Entity ent, StatusFlag statusFlag): StatusEffectData?

Returns a table of data for a specific status effect if that effect is currently active on that entity. Returns nil otherwise.

  • ent: The entity meant to house the data
  • statusFlag: The BitFlag of the status effect. Use the StatusEffectLibrary.StatusFlag enumeration table for convenience.

StatusEffectLibrary:RemoveStatusEffect(Entity ent, StatusFlag statusFlag): boolean

Removes a status effect from an entity. Returns true if removed successfully.

  • ent: The entity to remove the effect from
  • statusFlag: The BitFlag of the status effect. Use the StatusEffectLibrary.StatusFlag enumeration table for convenience.

StatusEffectLibrary:HasStatusEffect(Entity ent, StatusFlag statusFlag): boolean

Returns true if the entity has the provided status effect. false otherwise.

  • ent: The entity to check against
  • statusFlag: The BitFlag of the status effect. Use the StatusEffectLibrary.StatusFlag enumeration table for convenience.

StatusEffectLibrary:ClearStatusEffects(Entity ent)

Removes all status effects from the entity, if any are present.

  • ent: The entity to remove all effects from