Alright, I have the following situation:
- A custom class extended from Pawn, MyPawn.
- A custom method called GetCurrentStats.
Here’s my Skookum:
I would expect GetCurrentStats to autocomplete… but it doesn’t. None of my custom methods nor variables populate the list, despite being public. How do I get them to show up here?
My eventual plan is to set this Skookum method as the called method from a delegate on MyPawn (i.e. calls to MyPawn.MyDelegate.Broadcast() will be redirected to the Skookim method). Is this possible? A good idea?
Thanks in advance for the help.
Edit: More detail, in case it would be helpful. My desired result is this:
UFUNCTION(BlueprintCallable, Category = "Stats")
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FEffectDelegate, AMyPawn*, PawnToApplyEffectTo);
Skookum method (assignDelegate) on MyEffect.h
MyEffectDelegate = applyBuffConstant;
Skookum method (applyBuffConstant) on MyEffect.h
// do stuff to stats here, obviously assigning the return of the above function to a variable
Does this make sense? Is there a better way to do this? My goal is to be able to swap out my stats manipulation method at run-time between several options.
Also, I noticed that if I try to change the method signature to MyPawn* instead of MyPawn I get a compilation error, “Parameter specifiers must be named and no name was found.” Does Skookum automatically assume pass by reference and I don’t need the pointer? Or is something else going on?
I tried going through the four tutorials that were posted, but as far as I can tell none of them deal with delegates nor custom objects, which are the crux of my issue. I also checked the sample project.
Thanks again for the help.