Ability And Power-Up NUG
Overview
The Ability And Power-Up NUG manages temporary player states, unlockable abilities, and gameplay flags.
Use it for growth, shrinking, speed boosts, swim unlocks, charge states, temporary buffs, or other platformer-style powers.
Component
AC_AbilityComponent
What The System Does
- Stores active ability or power-up states
- Supports temporary duration-based effects
- Supports simple ability flags
- Lets doors and other systems check ability state
- Gives designers a place to add modular power-up behaviour
- Keeps each power-up expandable without rebuilding the whole system
Quick Setup
Use this section to test one temporary power-up.
- Add
AC_AbilityComponentto the player character. - Create or confirm the ability type enum exists.
- Create a power-up pickup actor.
- Set the ability type.
- Set the duration.
- On overlap, call
ActivateAbility. - Press Play.
- Collect the power-up.
- Check that the ability state becomes active.
- Wait for the timer to end and check that the state turns off.
Features
- Temporary power-ups
- Ability flags
- Duration handling
- Door requirement support
- UI display support
- Future modular data asset support
Runtime Flow
- Player collects or triggers a power-up.
- The pickup calls into
AC_AbilityComponent. - The component checks the power-up or ability type.
- The component enables the matching state.
- If the effect is temporary, a duration timer starts.
- UI can show active power-up state and remaining time.
- Doors, interactables, and hazards can check whether a state is active.
- When the timer ends, the component disables the temporary state.
Usage
Attach AC_AbilityComponent to the player and trigger abilities through pickups, interaction events, or gameplay events.
Blueprint Tutorial
Goal
Create a simple modular power-up that activates an ability state for a set duration.
Before You Start
Create or confirm these assets exist:
AC_AbilityComponent- A power-up pickup actor
- An ability or power-up enum
- A player character Blueprint
- Optional UI widget for active power-up display
Step 1, Add The Ability Component
- Open the player character Blueprint.
- Add
AC_AbilityComponentas an Actor Component. - Add default values for active states.
- Compile and save.
Step 2, Create The Ability Type Enum
Create an enum for ability or power-up types.
Example values:
NoneGrowShrinkSpeedBoostSwimCharge
Keep this small at first. Add more only when the base system works.
Step 3, Create A Power-Up Pickup
- Create a power-up pickup actor.
- Add a collision sphere.
- Add variables for ability type and duration.
- On overlap, get the player ability component.
- Call
ActivateAbility. - Pass ability type and duration.
- Hide or destroy the pickup.
Step 4, Build Activate Ability
Inside AC_AbilityComponent, create a function called ActivateAbility.
Suggested inputs:
AbilityType, EnumDuration, FloatSourceActor, Actor Reference
Function flow:
- Check the ability type is not
None. - Set the matching ability state to active.
- Broadcast active ability changed.
- If duration is greater than zero, start a timer.
- If duration is zero or less, treat it as a permanent unlock or manual state.
Step 5, Build Deactivate Ability
Inside AC_AbilityComponent, create a function called DeactivateAbility.
Suggested input:
AbilityType, Enum
Function flow:
- Check which ability needs to end.
- Set that ability state to inactive.
- Clear any active timer for that ability.
- Broadcast active ability changed.
- Update UI if needed.
Step 6, Test With A Door
- Place a door that requires an ability state.
- Try the door with no power-up active.
- Confirm the door stays locked.
- Collect the power-up.
- Try the door again before the timer ends.
- Confirm the door opens.
- Let the timer end.
- Confirm the ability state turns off.
Data Asset Plan
This section is reserved for the next modular pass.
Future setup:
- Create
PDA_PowerUpDefinition - Store power-up name, icon, duration, colour, sound, VFX, and ability type
- Let pickups reference the data asset instead of manually setting every value
- Let UI read display data from the same asset
- Let designers add new power-ups without editing the core component
Photo Slots
Use these slots when adding screenshots to the documentation site.
Ability Component On Player
Image slot: ability component on player.
Power-Up Pickup Setup
Image slot: power-up pickup setup.
Activate Ability Blueprint
Image slot: activate ability Blueprint.
Duration Timer Blueprint
Image slot: duration timer Blueprint.
Ability Door Requirement Test
Image slot: ability door requirement test.
Injected Blueprint Code Slots
Paste exported Unreal Blueprint node text into these blocks when the Blueprint is final.
AC_AbilityComponent, Activate Ability Function
Paste exported Blueprint node code here.
AC_AbilityComponent, Deactivate Ability Function
Paste exported Blueprint node code here.
Power-Up Pickup, Overlap Logic
Paste exported Blueprint node code here.
Ability Duration Timer
Paste exported Blueprint node code here.
Door Ability Requirement Check
Paste exported Blueprint node code here.
Common Issues
Power-Up Does Not Activate
Check that the pickup overlap is firing.
Then check that the player has AC_AbilityComponent.
Ability Turns Off Instantly
Check the duration value.
If the duration is zero or less, the system may treat it as permanent or invalid depending on your logic.
Ability Never Turns Off
Check that the duration timer is being started.
Also check that DeactivateAbility is called when the timer finishes.
Door Does Not Detect The Power-Up
Check that the door is checking the same ability type that the pickup activates.
Also check that the ability is active at the moment the door checks requirements.
UI Does Not Show The Active Power-Up
Check that the ability state changes before debugging the UI widget.
Multiple Power-Ups Break Each Other
Check whether each ability has its own state and timer.
Avoid using one shared timer if several ability types can run independently.
Extension Notes
- Add data assets once the first Blueprint version works
- Add VFX and SFX options later
- Add UI icons and cooldown or duration bars
- Add save support for permanent unlocks
- Keep temporary power-ups separate from permanent core abilities if the scope grows
- Let enemies reuse the same style of ability component later if needed
Testing Checklist
- Ability component exists on the player
- Power-up pickup activates the correct state
- Timed power-up ends after the duration
- Permanent unlock does not end unless manually cleared
- UI can show active state later
- Door can check ability state
- Multiple ability states do not break each other
- Designers can change duration without editing Blueprint logic