Skip to content

Blueprint Only Project

Jared Taylor edited this page Mar 20, 2025 · 16 revisions

Important

It is expected you have completed Setup New Project and PushPawn Setup

Helper Components

PushPawn typically operates through interfaces IPusheeInstigator and IPusherTarget but this is only available to C++.

When the interface is not found, it will look for the components UPusheeComponent and UPusherComponent which both have derived blueprint implementations available. These are mandatory for blueprint implementations.

Component Setup

There are content derived versions of UPusheeComponent and UPusherComponent containing a lot of blueprint boiler-plate that should be used.

UPusheeComponent: PushPawn/Blueprints/BP_PusheeComponent

UPusherComponent: PushPawn/Blueprints/BP_PusherComponent

Subclass both of these into your project.

Open the your new derived UPusherComponent and override UpdatePawnOwner():

image

Note

Make sure to cast to your own character! or Pawn

Open your character blueprint and add your new components:

image

Add a UGameplayAbility class variable:

image

image

Assign the Default Value as GA_PushPawn_Action

Tip

Even though we are using Blueprint we can still benefit from this included C++ based action if we don't need to change the behaviour in blueprint

image

Back in your pusher component override GetPushAbility():

image

Ability Setup

Open your character blueprint and duplicate the PushAction variable you recently created, name this PushScan.

image

Assign the Default Value as the ability you created derived from GA_PushPawn_Scan that this guide called GA_DemoPushPawn_Scan:

image

In our character blueprint, override the Possessed() and UnPossessed() functions and handle the granting and removal of ability as follows:

image

Caution

Never attempt to activate this ability yourself
PushPawn handles this internally for you

Testing

You can Play-in-Editor and it should now work! Run into another Pawn and watch as you push each other away.

If not, carry on to the Troubleshooting section.

Clone this wiki locally