x

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"

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:

alt text

Product Version: UE 4.8
Tags:
more ▼

asked Aug 02 '15 at 05:30 PM in Using UE4

avatar image

Agletsio
16 3 8 11

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

1 answer: sort voted first

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.

more ▼

answered Aug 02 '15 at 10:19 PM

avatar image

KITATUS
2.3k 98 84 398

avatar image Agletsio Aug 02 '15 at 11:04 PM

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: alt text

avatar image KITATUS Aug 02 '15 at 11:16 PM

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.

avatar image Agletsio Aug 02 '15 at 11:21 PM

Awesome! Thanks a million, really appreciate it!

avatar image KITATUS Aug 03 '15 at 12:08 AM
avatar image Agletsio Aug 03 '15 at 05:08 PM

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?

avatar image KITATUS Aug 03 '15 at 07:24 PM

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.

avatar image KITATUS Aug 03 '15 at 07:47 PM

Here's an image. alt text

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)

01.jpg (751.9 kB)
avatar image Agletsio Aug 03 '15 at 08:08 PM

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.

https://www.youtube.com/watch?v=WwfsWr4A894

I hope that makes sense?

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

avatar image KITATUS Aug 03 '15 at 08:20 PM

That's awesome!

I hope I at least managed to inspire that answer ;)

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 :)

(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