Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Kismet > API/Runtime/Engine/Kismet/UGameplayStatics
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h |
| Include | #include "Kismet/GameplayStatics.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp |
UFUNCTION (BlueprintPure, Category="Game",
Meta=(WorldContext="WorldContextObject", UnsafeDuringActorConstruction="true"))
static APlayerState * GetPlayerState
(
const UObject * WorldContextObject,
int32 PlayerStateIndex
)
Remarks
Returns the player state at the given index in the game state's PlayerArray. This will work on both the client and server and the index will be consistent. After initial replication, all clients and the server will have access to PlayerStates for all connected players.
Parameters
| Name | Description |
|---|---|
| PlayerStateIndex | Index into the game state's PlayerArray |