Hello all, I am trying to follow THIS TUTORIAL I have updated it from post 4.7.2 to new standards. (Changing FPostConstructInitializeProperties to FObjectInitializer Per changed to 4.7)
I cannot for the life of me Find BP_Blueprint>OnUsed and when I create an OnUsed Blueprint it gives me an error because the function is already created in C++. It is a blueprintreadwrite object but I cant seem to find the blueprint section of this tutorial for the life of me. Maybe I am blind. Any help would be greatly appreciated.
Hey The reason for this is that the Tutorial was made before you needed to also declare _Implementation in the Header.
Also it needs to have in the Marko BlueprintNativeEvent. BlueprintReadWrite wouldn’t be useful in a UFUNCTION. To call it, it would be the paramter BlueprintCallable as already done in the Tutorial.
So OnUse_Implementation and OnUse_Validate also need to be in the header:
public:
/** Use the actor currently in view (if derived from UsableActor) */
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, WithValidation, Server, Reliable, Category = PlayerAbility)
virtual void Use();
virtual void Use_Implementation();
virtual bool Use_Validate();
Thanks for the speedy reply Martin! I added all of those into the Character header file as well as OnUsed_Implementation, but it doesnt seem to have fixed the BP_PickupActor because the pickup actor is based off of the UsableActor class. Maybe I am not figuring this out correctly When I am adding the OnUsed function in blueprint should I be adding a new eventgraph called OnUsed or a new Function called on Used? First major coding project in UE4 and I am stumped.
Did you figure this out? I’m trying to adapt that tutorial to 4.7.5 and it’s not working. When I add the Use_Implementation, it is thrown out that it’s can’t be declared twice. Yet when I leave out the Use_Implementation, it complains that it has to be explicitly declared. The answer above, with “BlueprintNative” is thrown out because Server et al, can’t be specified with "BlueprintNative. The tutorial appears to be the only place to find this valuable implementation, but it needs updating as the engine changes.