BP Interface is like a portal gate that allows one BP Node to access different blueprints/actors/Pawns that have the interface implemented. We can define these interactions differently inside of those different blueprints. For example, we could make it so that a creep can take damage from a shot, while a wall doesn't do anything when its shot, when we put the damage handling functions inside the monster BP but not the wall BP.
The interface WhenHooked is applied to all the actors that have the "Hookable" tag, meaning that I want something to happen when our player's grapple hook hits it.
M2 -> Blueprints -> Blueprint Interace
Add a function
Define the Input and Output on the right
Go to Class Settings -> Interfaces -> Add (with the dropoff), and select that interface that we have setup
On Player (bp) side:
In Event Tick, when Grapple Connected == True, and the Hit Actor (actor scanned by the SphereTrace) Does Implement Interface returns True when the interface selected is WhenHooked, the event function When Hooked is called, taking us to the implementation on the "other end".
In Event Tick, the function Update Hook Point is then called for actors that have the tag "Moving".
On the Hit Actor side (in this case the Moving Cube):
When Update Hook Point is called, which in this case triggers, we save the current location of our moving actor as On_Contact_Location to a vector variable for future uses.
When When Hooked is called, it fetches the On_Contact_Location to compare it to the actor's current location, getting the subtraction, then use this as the New Location that applies to the HookPoint through the function Set Actor Location