Using UE 5.7.2-0
Context on how “Wait for Attribute Changed” and “Wait Gameplay Effect Applied to Actor” behave in my observations.
Wait for Attribute Changed: fires 3x on the predicting client, once the predicted application (infinite effect), the removal of that effect, application of the server instant effect. That’s all expected but I cannot differentiate between predictions, actual increases or decreses and server side changes at all.
Wait Gameplay Effect Applied to Actor: only fires once with the predicted effect. If it would just fire twice I could check if it was a infinite effect + some tags and could determine if it was the server. But even then this solution would only work for the local client as effects are not replicated to other players.
Possible solutions I could think off:
After “Wait Gameplay Effect Applied to Actor” triggers, wait for the active handle to be invalid, then look up the new server effect. Kinda works for duration effects but is inconsistant and I was not able to get it to work with instants.
Write my own “Wait Gameplay Effect Applied to Actor” that somehow hooks into the modify effect value, which is used when the predicted effects values or duration changes. I read through lot of the sourcecode to understand prediction, I think i got a quite good grasp on it but I’m not confident in writhing such a wait function myself if there are other options.
Use a Gameplay Cue. I didn’t find a way yet to solve my issue with Cues. It would solve that that other clients also get the information with as much context as I need.
Only Wait for (either function), on the server and then use RPCs to trigger the desired effects on the owning or all clients. Seems very flexible, I think I could implement that but feels like I’m working around GAS, maybe there is a solution I’m missing. ![]()
Enabling full effect replication (I’m mixed right now), I think would be a bad desicion for my game as I have a ton of effects that only concern the predicting onwing client and the server.
Clear prediction key before such effects (disable prediction essentially). I tested that works but kinda feels like I’m working against GAS.
To answer possible questions like: “do you need those attribute changes to be predicted?”. Right now I do not not but I generally need a solution to listen to the effect modification (magnitude/duration change) so I can use the predicted effect for instant feedback and server effect for correction.
Edit: Also just having an option to only wait for the server effect in general, ignoring the prediction, would be nice. My solution for that was just checking active effects periodically on the client, doesn’t work for instants tho.
