Can't get matinee to trigger with LMB input through Line Trace (via Tag)

This is for a First Person game

I want to press LMB which will then fire a Line Trace For Objects and check if the actor has the tag “Animate” (the object I want to animate has the tag “Animate”). If it does, I want it to play the referenced Matinee (in this case a drawer opening).

What am I doing wrong? This is my current blueprint setup:

Put a branch. Connect it to the ActorHasTag

Connect that to the Line Trace

Connect a “DoOnce” node afterwards

“Set time” on Matinee (Just like you added the “Play” function") and connect the “Set Time” (Or whatever it’s called") to the DoOnce output. Set the SetTime to 0.

Play the Matinee

Add a Matinee Controller (Just like you added the “Play” function") and connect the finished to reset of DoOnce.

Hang on, When I get a moment, I’ll upload an example project and screenshots. Give me a few minutes to get it all sorted.

Hey, thanks for responding. I am having some trouble understanding your answer. Sorry if these questions are stupid, I’m not very well versed in the ways of Unreal Editor yet. I’ve been struggling to get this right for ages, you’re help is much appreciated!

  • When you say “Just like you added the Play function”, what do you mean?
  • Is “Set Time” a variable of a function? I could only find a “Set Timer” function.
  • You say “Play Matinee”. Does this mean connect the connect the “Drawer Matinee” variable to the “Play” function (like in the blueprint)? Or do you mean physically open the matinee editor and play it?
  • What is a "Matinee Controller?

Here’s my current blueprint:

Awesome! Thanks a million, really appreciate it!

Here you go! - kitatus.co.uk

Hey,

I’ve downloaded your project but the map doesn’t want to load (it says I should the map was saved in a newer version even though I have 4.8.2). And the built version won’t launch.

And after seeing the video it looks like a triggerbox matinee tutorial. I don’t know if this addresses my current problem?

I’m not sure how to trigger the matinee with the line trace via the tag?

When I insert a “Print String” I can see the result returns “true” yet the matinee still doesn’t trigger.

It also seems that the matinee controller can only be referenced in the Level BP, while I’m working in the Player BP. Don’t know if you knew that?

That’s weird, It works on multiple machines I’ve tested it on - Let me take a few annotated screenshots when I get a spare moment.

It doesn’t matter HOW it’s fired - It’s the code that actually fires that matters.

You can easily send the information to the PlayerBP and fire it there if you want; It doesn’t really matter - As long as you make sure you’re actually making the LEVELBP send the correct Matinee over (This is because Matinees only ever exist in the levels and not in any Blueprints)

Personally, I wouldn’t have the Matinee in the player; It’s a very unclean way of doing things - Say you wanted to put the character in a new level or have separate matinees for separate things - It can complicate code really quickly. I mean it works but it isn’t suggested.

Here’s an image.

I’d recommend doing the trace and then calling an event dispatcher though if you’re doing it via the PlayerBP and not the level; To make sure you’re firing the right Matinee .etc

(Right click > Open Image in New Tab)

That’s awesome!

I hope I at least managed to inspire that answer :wink:

For tracking purposes, I’m going to mark this thread as the “Answer”, As the answer is contained within the posts!

Thanks for being awesome :slight_smile:

Ok so managed to figure it out! But not using tags though. For some reason, the line trace didn’t pick up the tag when it hit a blueprint object.

So instead of tags I used custom interface events in the objects’ blueprint and then made the line trace (in the player BP) call the the interface. I called the matinee animations via a “Matinee Actor” variable.

Basically I followed the logic in this video and replaced the object moving functions with matinee play functions.

I hope that makes sense?

Also, thank you very much for taking the time to help me!