Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to check if there is a montage playing in a given slot?

I have an effect system implementation for a turn based game.

Basically an effect is anything that can harm, buff or in some way affect a character in any way.

I have written the effect as an actor blueprint and the character classes spawn them once they get affected by some source. The characters then destroy the effect instance once the effect is resolved.

For my character's animation blueprint asset, I've added a montage slot for effects. Basically it blends into the locomotion pose of the character (idle, walking, running and stances (crouch, stand, prone)). Upper body or full body blending is controlled through the animation graph. I would like this slot to be controlled by any kind of effect classes in the game.

I do not want an effect to override an existing montage in this slot which is currently playing. For instance I have multiple damage over time effects and the animations would look bad for this case if all effects restart the slot montage with their own montage replacements.

What I want to do is to replace the montage in the slot only when there is no active montage currently playing in this slot. So that the slot plays only once for the first effect which initiates the animation (the rest of the effects which coincide with the first montage's play time will simply ignore animation and spawn only sounds and particle system etc.).

There is only one method exposed to the Unreal editor for checking if a slot is playing a montage. This is the "IsPlayingSlotAnimation" method.

My problem is this method requires a montage as a parameter. And checks if this montage is currently playing within the slot.

So how can I check if there is any montage playing in a slot? I am simply asking for a "IsPlayingSlotAnimation" method without a parameter.

Product Version: UE 4.14
more ▼

asked Nov 25 '16 at 10:25 AM in Blueprint Scripting

avatar image

159 17 20 39

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first
more ▼

answered Jul 19 '19 at 12:42 PM

avatar image

11 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

alt text

You can check if "character" is playing a montage. the best is you can compare what this function return with montage you want to play. should solve your problem. +rep if I helped ;)

more ▼

answered Apr 15 '18 at 06:40 PM

avatar image

26 2 6

avatar image Olathuss Sep 15 '18 at 07:14 PM

This doesn't answer the question. The question is about montage playing within a particular slot, not montages in general.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question