Skip to content

Global Class "PlayerManager"⚓︎

Info

You can get this class by using the PlayerManager global table.

Note that to call these functions, you must use a . (period) instead of a : (colon)!

Example Code
1
local hasTrinket = PlayerManager.AnyoneHasTrinket(TrinketType.TRINKET_SWALLOWED_PENNY)

Functions⚓︎

AnyoneHasCollectible ()⚓︎

boolean AnyoneHasCollectible ( CollectibleType Collectible )⚓︎

Returns true when any player has the item and false when no one does.


AnyoneHasTrinket ()⚓︎

boolean AnyoneHasTrinket ( TrinketType Trinket )⚓︎

Returns true when any player has the trinket and false when no one does.


AnyoneIsPlayerType ()⚓︎

boolean AnyoneIsPlayerType ( PlayerType PlayerType )⚓︎


AnyPlayerTypeHasBirthright ()⚓︎

boolean AnyPlayerTypeHasBirthright ( PlayerType PlayerType, )⚓︎


AnyPlayerTypeHasCollectible ()⚓︎

boolean AnyPlayerTypeHasCollectible ( PlayerType PlayerType, CollectibleType Collectible, boolean IgnoreModifiers = false )⚓︎


AnyPlayerTypeHasTrinket ()⚓︎

boolean AnyPlayerTypeHasTrinket ( PlayerType PlayerType, TrinketType Trinket, boolean IgnoreModifiers = false )⚓︎


FirstBirthrightOwner ()⚓︎

EntityPlayer FirstBirthrightOwner ( PlayerType PlayerType )⚓︎


FirstCollectibleOwner ()⚓︎

EntityPlayer FirstCollectibleOwner ( CollectibleType Collectible, boolean LazSharedGlobalTag = true )⚓︎

Returns nil if the specified collectible has never been picked up.


FirstPlayerByType ()⚓︎

EntityPlayer FirstPlayerByType ( PlayerType PlayerType )⚓︎


FirstTrinketOwner ()⚓︎

EntityPlayer FirstTrinketOwner ( TrinketType Trinket, RNG RNG = nil, boolean LazSharedGlobalTag = true )⚓︎

Returns nil if the specified trinket has never been picked up.


GetEsauJrState ()⚓︎

EntityPlayer GetEsauJrState ( int Index = 0 )⚓︎


GetNumCollectibles ()⚓︎

int GetNumCollectibles ( CollectibleType Collectible )⚓︎

Returns the number of collectibles held by all players.


GetPlayers ()⚓︎

EntityPlayer[] GetPlayers ( )⚓︎

Returns a table containing all players.


GetTotalTrinketMultiplier ()⚓︎

int GetTotalTrinketMultiplier ( TrinketType Trinket )⚓︎


IsCoopPlay ()⚓︎

boolean IsCoopPlay ( )⚓︎

Returns true if the game is in co-op mode.


RemoveCoPlayer ()⚓︎

void RemoveCoPlayer ( EntityPlayer Player )⚓︎

Can be used to safely remove extra player entities, such as Strawman.

Tip

Don't pass the main player to this!


SpawnCoPlayer2 ()⚓︎

EntityPlayer SpawnCoPlayer2 ( PlayerType PlayerType )⚓︎


SpawnSelectedBaby ()⚓︎

void SpawnSelectedBaby ( BabySubType BabyType, int ControllerIndex )⚓︎


TriggerRoomClear ()⚓︎

void TriggerRoomClear ( )⚓︎