Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCESUBSYSTEMS AND LIBRARIES

UCFDebugModeSubsystem

MODULECrushformDebugINCLUDECFDebugModeSubsystem.hPARENTULocalPlayerSubsystem

The debug mode of one local player: a free camera, a Slate overlay of tools and buttons, and a blocking input component while it is on. Anything that changes the world goes through the player's ACFDebugRelay, so the server decides.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
bool IsActive() const
PUREC++ ONLY

Whether the mode is on for this player.

void Toggle()
C++ ONLY

Enters the mode when it is off, exits it when it is on.

void Enter()
C++ ONLY

Turns the mode on: spawns the free camera, shows the overlay and starts blocking the pawn's input. Does nothing when already on or the player has no controller, viewport or camera manager.

void Exit()
C++ ONLY

Turns the mode off: destroys the camera, removes the overlay and restores the input and cursor state. Does nothing when off.

FCFDebugToolSettings& GetSettings()
C++ ONLY

The tool settings the menu edits.

bool IsAiming() const
PUREC++ ONLY

Whether the player holds the aim button (right mouse): the camera flies and the crosshair tool is armed.

UCFDeformComponent* GetTarget() const
PUREC++ ONLY

The body the tools act on; null when none is selected or it was destroyed.

void SetTarget(UCFDeformComponent* InTarget)
C++ ONLY

Selects the body the tools act on. A dent delta-v outside the new target's profile range is clamped into it.

void CycleTarget(int32 Step)
C++ ONLY

Selects the next body in this world for Step > 0, the previous for Step < 0, wrapping around. With no target, a step forward lands on the first body and a step back on the last.

void BeginPick()
C++ ONLY

The next crosshair fire picks a body, then the tool that was active comes back.

FCFDebugTargetInfo GatherTargetInfo() const
PUREC++ ONLY

Reads the current target for the menu; bValid is false when there is no target.

bool AreServerToolsAvailable() const
PUREC++ ONLY

Whether the server accepts this player's world-changing tools: always for the server's own player, for a client only while Crushform.DebugMode.AllowClients is 1.

void DamagePreset(ECFDebugDamagePreset Preset)
C++ ONLY

Asks the server to hit the target with a damage preset. Does nothing without a target.

void Repair()
C++ ONLY

Asks the server to repair the target. Does nothing without a target.

void Wash()
C++ ONLY

Asks the server to wash all dirt off the target. Does nothing without a target.

void FillDirt(ECFDebugDirtPreset Preset)
C++ ONLY

Asks the server to fill the target's dirt with a preset at the menu's dirt amount. Does nothing without a target.

void Drop()
C++ ONLY

Asks the server to drop the target from the menu's height, optionally upside down. Does nothing without a target.

void ResetWorld()
C++ ONLY

Asks the server to repair and wash every deformable body in the world, clear debris and respawn the props.

void RespawnProps()
C++ ONLY

Asks the server to respawn the world's breakable trees and fence units.

void ClearDebris()
C++ ONLY

Asks the server to clear the loose debris on every machine.

bool IsWorldPaused() const
PUREC++ ONLY

Whether the world is paused, by any means.

void SetPaused(bool bPaused)
C++ ONLY

Asks the server to pause or unpause the world. The pause is held for this player and lifts when they unpause or leave the mode.

void StepFrame()
C++ ONLY

Asks the server to run one frame of a paused world and pause again.

float GetTimeDilation() const
PUREC++ ONLY

The world's time dilation, 1 for normal speed.

void SetTimeDilation(float Dilation)
C++ ONLY

Asks the server to set the world's time dilation, 1 for normal speed.

bool DoesHoldPause() const
PUREC++ ONLY

The world is paused and this player's relay holds the pause (ACFDebugRelay::DoesHoldPause).

int32 GetCVarInt(const TCHAR* Name) const
PUREC++ ONLY

The integer value of a console variable by name; -1 when it is not registered.

void SetCVarInt(const TCHAR* Name, int32 Value)
C++ ONLY

Sets a console variable to an integer value (set by console). Does nothing when it is not registered.

void TickMode(float RealDeltaSeconds)
C++ ONLY

Called by the camera every frame, on a paused world too.

void OnCameraEndPlay()
C++ ONLY

Called by the camera when it ends play. Safe in any order with Exit().