Hello, I’ve been working on this for some time and I’m not too sure where to look next.
I’m going to attempt to give as much info as I possibly can, because I’m not quite sure what the issue is.
So I have a character set up with a few components, and the AbilitySystemComponent gets instantiated in a custom PlayerState class, and further built out in a component named PawnExtensionComponent that was supposed to emulate the Lyra Starter Project
As you can see I just set up the initial bits of it in the constructor of the PlayerState
And the HealthComponent that is designed to handle player healing/damage and anything related to health gets setup with the abilitysystem and gets the HealthSet that I defined
So along with all that I just built out an inventory system that im also attaching to the character in a component, and filling it with items. One of them Im testing with is just a food item to heal the character by 10 health. So I’m attempting to modifiy the Health attribute in HealthSet by sending a GameplayEffect inside the Use function and applying the effect spec to self.
I know for sure that the function is getting called, as you can see with my breakpoint here. But inside the SpecHandle Data, the ModifiedAttributes array is empty, when it doesnt seem like it should be? Because none of the other attributes are getting any update requests
Heres a quick look at my item and effect that im using together to map to the Use function
I also encountered that before when using TSubclassOf<GE>, in Lyra there is a method BP_ApplyGameplayEffectToSelf, try implement that and call it instead, it should hopefully solve your issue.
I did end up trying that, and it didnt work unfortunately. I could see that it was breaking somewhere specifically with applying the effect and nowhere else because all my values were initialized just fine. It must have been something else that I added that was blocking the ability to update the attribute set.
I ended up tearing down all the complexity I built around it and started from scratch and was able to apply effects made in BP to the character.
It could have had something to do with having the AbilitySystemComponent initialized in the PlayerState or something else entirely. Not really sure.
I’m new to Gameplay Effects, but what calculation are you running? I don’t see that in the BP you posted.
The calculation class is where the effect is actually applied, so that is probably where you want to look.
Edit: I see actually the execution classes array is empty. I believe this is your problem. You need to add an Execution Class to implement the application of the effect.
I had quite a few situations where my GE wouldn’t fire and in the end it was either a misconfigured GE or a blocking tag that was present that shouldn’t have been. Not setting Retrigger in some GE’s got me a few times.
Next time it doesn’t work though, step into all the methods until you find the issue. Most cases it is just a setting that can be tweaked and your GE will work as expected.
I ended up figuring out the issue. Turns out its because the Use() function for the item was never running on the server, and the UObject wasn’t being replicated. I ended up making a new ReplicatedObject class and making my item a child of that while making sure that my UseItem function on my character was executed by the server only.