-
Notifications
You must be signed in to change notification settings - Fork 16
Blueprint Only Project
Important
It is expected you have completed Setup New Project and PushPawn Setup
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.
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():

Note
Make sure to cast to your own character! or Pawn
Open your character blueprint and add your new components:

Add a UGameplayAbility class variable:


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

Back in your pusher component override GetPushAbility():

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

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

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

Caution
Never attempt to activate this ability yourself
PushPawn handles this internally for you
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.