[UE4] Event Dispatcher used like a Property Change Listener

In Java, Property Change Listener fires a method whenever a variable is changed. This type of feature can be very useful for updating variables across blueprints (e.g. Animation Blueprint). This means avoiding checking and updating variables using Event Tick, Event Blueprint Update Animation pins and only updating it when original variable is changed. This tutorial shows you how to set-up the structure and how to utilize the Event Dispatcher created.

Part 1

Create a macro/function for the variable you want to watch.

Create an event dispatch specifically for that value you want with output has same data type as the change target variable.

Now inside the created macro set up. Set-up the blueprint as follows:

Change pin connected to the InputAction Crouch to the created macro/function.

Part 2

In the animation blueprint, change how the Crouching local variable is updated as follows:

Leave a comment