Play Matinee from and Actor BP?
Ill try to be brief. I have set up this: When VR headset looks at a BP actor, it highlights, then when highlighted, the player can press a button (A, X, Z whatever) and it will play a matinee animation. It was from a tutorial, but my understanding is that the character calls specific function events when/if they are looking at the object. However, from inside the actor/objects event graph i cant seem to reference a matinee actor, i seem to only be able to do that in the level BP.
I really just need it to play the matinee animation then reverse with a flipflop whenever the character is looking at the object and presses whatever button. I'm still learning blueprints, so this is causing a giant headache. Any help would be appreciated, i hope my problem makes sense.
asked Jul 28 '16 at 03:12 PM in Blueprint Scripting
Your problem is that only the level blueprint knows your matinee actor (or sequencer, for that matter) is in the level; it is actually containing every actor spawned within. But the other actors can't know what is in the level, or what components are inside other actors, unless you get an explicit reference to them. That is the reason you can reference the matinee the same way that you can get a reference to any component within a given blueprint (by just dragging). Notice that if you try to drag a different spawned actor to some random blueprint you wouldn't be able to reference it either (but would in the level blueprint).
To call an event, function or variable inside another blueprint you need a reference to the particular actor before you can begin communication. There are many ways to get it, for example a trace, like the tutorial you mention is probably doing, or an overlap. Also many ways to establish communications, either directly, by using an interface (also probably in the tutorial) or an event dispatcher.
The thing is that you can't trace/overlap/etc with your matinee actor, so getting a reference to it is harder. Also, no actor can get a reference to the level blueprint because the level BP isn't an actor, so communicating with it is hard too.
You have three possible solutions:
Blueprint communications is a broad but important subject. This video might help. It covers casting, interfaces and event dispatchers, in case you aren't familiar with the concepts: https://www.youtube.com/watch?v=EM_HYqQdToE
All the best.
answered Jul 30 '16 at 11:42 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here