Hi, I have a function that stuns player for a few seconds but if any montage is playing i need to delay it until currently playing montage ends. Is there a way to get how many seconds left till current montage ends ?
Instead of using a delay, why don’t you just check if the player should be stunned after the On Completed pin of the Play Montage node?
The problem with this , I dont know which montage is currently playing and when it will end. Is there a way to call stun function after currently playing montage like you said. I need exactly what you said but it has to work on any montage that is currently playing.
Just create a custom event and call it after the On Completed pins of your Play Montage nodes. Then check the condition after the custom event.
I have more than 100 montages. Its impossible to call after every single montage.
Apparently there’s a Get Current Montage node which you can use to access what you want. I couldn’t find a node to get the remaining time, but you should be able to calculate it simply by subtracting the montage position from the total length.
I also found a node called Bind Event to On Montage Ended but didn’t test it myself, I’m not on PC right now.
I get it by subtracting montage position from the play length. This works perfectly for me, Thank you so much.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.