So in my level blueprint I have a matinee which plays when you overlap with a trigger. I made it rewind when it’s done playing and I set a branch on it so that you can’t play it twice in a row. What I want to do now is to make a blueprint that communicates with the level blueprint and sets the condition to true so the player can activate the matinee again. Here’s my blueprint to play the matinee:
There no way to do that in blueprints, only in C++. There simple workaround in your case, instead of setting variable in level blueprint, use variable in different class
I’m not sure how to use a variable in a different class. The basic thing I want is for the matinee to run once but then have it be able to run again if the player touches another trigger. Similar to having a condition and setting it to false but then touching another trigger sets it to true.
Have you tried to make the trigger box into its own blueprint and have it trigger through that instead of the level blueprint?
Go to your blueprints folder, right-click and select to create a Blueprint asset. Click on All Classes and type in “TriggerBox.” Name it whatever you would like. Then put in the blueprints shown in this image:
This basically says, “Hey, I overlapped with an actor, so once and only once I’ll get all the matinee actors and look at their names and if they name of the matinee actor is the one I know, I’ll play it.” You can name your MatineeActor whatever, I just kept the default since I was only making an example. I wouldn’t be surprised if there are better practices for this, but this is quick and gets you the result you want. You could even make a variable called “MatineeName” and have it be editable/public so you can edit the name in Details from the main level viewport when you place the trigger actor. To do that you’d just right click the pink input node in the String Equals and promote it to a variable, then in the left hand side click the closed eye symbol. Now when you look at your custom trigger box you can see the MatineeName variable is editable so you can trigger a different matinee actor with it. (I added a light so I knew where to step.)
When you right click to create a new node (or drag off from Get Display Name) just hit = or type “equals” and you should see Equals (String) or something close to that.