Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
Mock Ability Simulation This is meant to illustrate how a higher level simulation can build off an existing one. While something like GameplayAbilities is more generic and data driven, this illustrates how it will need to solve core issues.
This implements:
Stamina "attribute": basic attribute with max + regen value that is consumed by abilities.
Sprint: Increased max speed while sprint button is held. Drains stamina each frame.
Dash: Immediate acceleration to a high speed for X seconds.
Blink: Teleport to location X units ahead
MockAbility Data structures
| Name | FMockAbilityInputCmd |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockAbilitySimulation.h |
| Include Path | #include "MockAbilitySimulation.h" |
Syntax
struct FMockAbilityInputCmd : public FFlyingMovementInputCmd
Inheritance Hierarchy
- FFlyingMovementInputCmd → FMockAbilityInputCmd
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bBlinkPressed | bool | MockAbilitySimulation.h | ||
| bDashPressed | bool | MockAbilitySimulation.h | ||
| bPrimaryPressed | bool | MockAbilitySimulation.h | ||
| bSecondaryPressed | bool | MockAbilitySimulation.h | ||
| bSprintPressed | bool | MockAbilitySimulation.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void NetSerialize
(
const FNetSerializeParams& P |
MockAbilitySimulation.h | ||
void ToString
(
FAnsiStringBuilderBase& Out |
MockAbilitySimulation.h |