Hello @Suspensium !
I faced a similar problem when attempting to activate an ability with payloads. The same applies if you want to activate an ability through input. Unfortunately, there isn’t a direct function for this—you’ll need to use ActivateAbilityFromEvent.
For your case i would considerer:
-
Use a random generator with the same seed on both the server and the client. This way, you will get the same random value on both ends. You could use the Ability Prediction Key as the seed to ensure consistency between the server and client.
-
Let the Client or Server select the montage and create an ability task to sync the montage between Server and Client.
If the ability is started by the client, it might be better to allow the client to select the montage and sync it to the server to reduce waiting time. However, this could open the door to potential cheating, as the client could always select the same montage. If it’s just a cooperative game, this approach should work fine. Otherwise, you might want to consider having the server select the montage and let the client sync with the server.
For example, check how UAbilityTask_WaitTargetData is implemented. You can try implementing your own AbilityTask or attempt to use UAbilityTask_WaitTargetData with custom target data that includes the Montage pointer.
Keep in mind that WaitTargetData only sends data from the Client to the Server, so you can’t use it to send data from the Server to the Client.
Hope this works!