There is probably a ton wrong with it, but this is as far as I have gotten with the documentation (which never gave an example of what a working function looks like)
if you want a function to work in CPP and blueprint, try this:
in the editor, go to file> add code to project, and make a new class based off HUD called myHud.
//inside the myHud.h class, between the brackets add:
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "MyStuff")
FString getWords( FString Word1, FString Word2 );
//at the end of the myHud.CPP file, after the brackets add:
FString myHud::getWords_Implementation( FString Word1, FString Word2 )
{
return Word1;
}
and as i said look on functions in api refrence, most function in UE4 is declered same way looking on existing nodes and seeing how they declered is best way to learn secrets of UFUNCTION