Hi, I’m trying to make a game using PaperZD and GAS. At the moment, I’m stuck trying to get a chargable attack working.
I’ve created a gameplay ability for the attack, and given it 3 states: startup, charging, and attack.
The startup and attack animations are non-looping and the charge animation loops. When the startup animation finishes, the animation blueprint triggers a gameplay event that causes the ability to trigger the charging animation and check the current time.
When the attack ability is released or the maximum charge duration passes, the time since charging started is checked, and used to calculate the damage of the attack. When running standalone or from the server, this works as intended.
However, when running this from the client, the damage dealt always treats the move as if it wasn’t charged at all, despite the animations playing correctly. Logging and checking K2_HasAuthority at various steps showed that the ChargeStartTime was being set on the client, but not on the server, despite the ability being local predicted. I tried adding a Server RPC within the ability, but that didn’t result in any change.
How can I correctly replicate the time passed during part of a gameplay ability from client to server?