Hello,
I was hoping you could elaborate on the best practices for having abilities that involve 2 or more characters.
My assumption is basically you do either:
- Update ability tasks so they don’t assume the task is being ran on the ability owner, but handle passing in a ability component
- Setup a “paired” ability that gets triggered from the primary driver.
- Miss out on using any ability tasks.
Simple example would be any sort of paired interaction where you want to play animation on both at the same time. Given the assumptions in most UAbilityTask that the actions should be ran on the ability owner it leads me to believe you’d trigger a second ability and communicate via events or something else?
Looking at it more, I assume you do one ability per character to handle the late joining montages all getting applied correctly for GameplayAbilityRepAnimMontage.
From my experience the best way to handle this is to have unique abilities for each interacting character, like your #2 option. You then have access to UAbilityTask_NetworkSyncPoint for WaitNetSync to make sure clients and server are lined up and montages can by synced for everyone.
Getting these actors to line up nicely is another matter and a bit outside the scope of your question I think, but I’m happy to discuss more if you have any further questions.
Thanks! The dual abilities is a tiny bit annoying, but manageable. Just wanted to make sure that was expected. The alignment issue we’ve got pretty well under control, but will reach out if that starts becoming an issue.