Working through a series by Lesser Dog Tutorials on how to make a LucasArts style point and click adventure in Blueprints, I have instead of using Blueprints I have been translating everything into C++, and it’s so much fun.
Feels like doing a crossword and a half-dozen other fun puzzles besides. Today’s solution found was uncovering how Unreal dispatches Interfaces when they’re implemented in C++, and overridden in a Blueprint, but called by C++.
Turns out they have this — as far as I can tell, undocumented1 — feature where you call a static method on the interface implementing class that is generated by Unreal’s Header Tool (UHT) so:
HotSpot::Execute_LookAt(CurrentHotSpot)
That gets the job done, to have my little man read the poster response from the blue print via the Blueprint visually coded look at event.
Blueprints are amazing, and have their place, but complex logic in blueprints gets into a snarl of spaghetti so quickly.
Code is here:
Don’t worry - I will get back to dishing on AI shills at some point in the near future.
At least I couldn’t find it here: https://dev.epicgames.com/documentation/en-us/unreal-engine/implementing-blueprint-interfaces-in-unreal-engine#blueprintnativeevents
Share this post