UBlueprintFunctionLibrary USpawnQueueBPLibrary
Description
This class includes Spawn Queue and Join Queue features.
What does it do?
Spawn Queue stores player info and returns list of spawn ready players at specific time.
Join Queue stores player controllers and returns list of player controllers ready to enter the server. Join Queue also searches player info if this exists it uses privilege settings to to define when player controller is ready to enter the server. If there is no player info for join queue players will be treated as regular.
How to use?
To create a realtime spawner add SpawnRun to timer, in game mode. Do the same with JoinQueueRun.
Now you can use AddToJoinQueue and SpawnListAdd to add players into join queue and spawn queue.
Static Public Member Functions
static bool SpawnListAdd (APlayerController *Controller, FString PlayerID, UClass *Class, ESpawnClass SpawnGroup=ESpawnClass::Lobby, EQueuePrivileges AccessLevel=EQueuePrivileges::Regular, float AdditionalDelay=0.0)
static void GiveAllQueue (TArray< FSpawnQueue > &SpawnQueue)
static void EZSpawn (UObject *WorldContextObject, FSpawnQueue SpawnQueueInfo, bool AutoRemoveFromSpawnQueue, bool &Reroll)
static bool RemovePlayerByController (APlayerController *Controller)
static bool RemovePlayerByID (FString PlayerID=FString(TEXT("")))
static void IsInSpawnQueue (APlayerController *Controller, FString PlayerID, bool &IsInQueue, FTimespan &SpawnTimeLeft, int &NumberInQueue)
static void QueueTimeLength (FTimespan &Length)
static void QueuePlayerCount (int &PlayersLeft)
static void FindByController (APlayerController *Controller, FSpawnQueue &Result)
static void FindByID (FString PlayerID, FSpawnQueue &Result)
static void SpawnRun (TArray< FSpawnQueue > &List, ESpawnBranch &Branches)
static void RandomStr (int32 Length, FString &Value)
static void Wipe ()
static void AddToJoinQueue (APlayerController *PlayerController, ESpawnQueueAddStatus &Status, bool &Kick)
static bool IsJoinQueueFull ()
static bool IsInJoinQueue (APlayerController *PlayerController, int32 &NumberInQueue)
static int32 JoinQueuePlayerCount ()
static bool RemoveFromJoinQueue (APlayerController *PlayerController)
static void JoinQueueRun (bool AutoRemove, TArray< APlayerController * > &Players, ESpawnBranch &Branches)
static TArray< APlayerController * > JoinQueueSort ()
static bool FindFromJoinQueue (APlayerController *PlayerController, int32 &Index)
Static Protected Member Functions
static void Find (APlayerController *Controller, FString PlayerID, FSpawnQueue &Result)
static TArray< FSpawnQueue > SortByDate (TArray< FSpawnQueue > List)
static bool IsEmpty (FSpawnQueue PlayerQueueInfo)
static bool RemovePlayer (APlayerController *Controller=nullptr, FString PlayerID=FString(TEXT("")))
Static Protected Attributes
static TArray< APlayerController * > ServerJoinQueue
static TArray< FSpawnQueue > spawnlist
static bool InitTT
static FSpawnQueue emptyInitReadyPI