Skip to content

AMRISubjectState

Replicated player state holding all per-frame data needed for experiment logging and replay.

Syntax

class AMRISubjectState : public APlayerState

Remarks

This is the central state object for the MRI experiment framework. All information that must be available to both the live game and the spectator replay controller (e.g. position, TTL state, score, beep events) should be stored here as UPROPERTY(Replicated) fields.

Access is restricted to AMRISubjectController via friend declaration to enforce that state mutations always go through the controller's logic. UCLASS

Inheritance Hierarchy

APlayerStateAMRISubjectState

Methods

Method Signature Description Blueprint
AMRISubjectState AMRISubjectState::AMRISubjectState() Initializes all replicated fields to their default values.
CopyProperties void AMRISubjectState::CopyProperties(APlayerState *playerState) override Copies replicated properties from another player state.
GetDisplayedPromptType EDisplayedPromptType AMRISubjectState::GetDisplayedPromptType() const Returns the type of on-screen prompt currently being displayed. yes
GetFrameNumber uint64 AMRISubjectState::GetFrameNumber() const Returns the current simulation frame number. yes
GetGameTimeStamp int32 AMRISubjectState::GetGameTimeStamp() const Returns the in-game timestamp for the current frame in milliseconds. yes
GetLifetimeReplicatedProps void AMRISubjectState::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > &outLifetimeProps) const override Registers which properties are replicated.
GetLocation FVector AMRISubjectState::GetLocation() const Returns the subject's current world-space location. yes
GetOrientation FVector AMRISubjectState::GetOrientation() const Returns the subject's current forward orientation vector. yes
GetPlatformTimeStamp int32 AMRISubjectState::GetPlatformTimeStamp() const Returns the platform timestamp for the current frame (milliseconds since epoch). yes
GetPoints int AMRISubjectState::GetPoints() const Returns the subject's accumulated score for this run. yes
GetSecondsToStartOfRun float AMRISubjectState::GetSecondsToStartOfRun() const Returns elapsed seconds between demo start and the first TTL of this run. yes
GetSimulationStepInSeconds float AMRISubjectState::GetSimulationStepInSeconds() const Returns the duration of the last simulation step in seconds. yes
GetTransform const FTransform & AMRISubjectState::GetTransform() const Returns the subject's current world transform (position + rotation + scale). yes
IsBeep bool AMRISubjectState::IsBeep() const Returns whether a synchronization beep is currently playing. yes
Reset void AMRISubjectState::Reset() override Resets the player state to its initial values.
ResetExperimentState void AMRISubjectState::ResetExperimentState() Resets only the experiment-specific state (not base PlayerState fields).
isTTL bool AMRISubjectState::isTTL() const Returns whether a The TTL is currently pressed. yes