Play diferent Matinee

Hi!

Let me explain a little bit my case…

In my project I have something like:

  • C++ Box Class, which have an overlapping component. I have a Blueprint of this class, to spawn “Trigger Boxes” to check if the player is inside.
  • C++ Character, who have a function, that only works if the player is inside of any of the boxes (The trigger box change to true a bool).
  • I have some matinee’s, which they are played when the user use the function. (I have to play these inside the LevelScript C++, because is necessary to call de Play function of matinee. When the character call the function, change a bool [PlayMatinee] to true).

So… Which is the problem?

Imagine a group of doors, which their have respective trigger boxes.
Each door, have his attached matinee and his own trigger box.

The problem is, that when I call the function inside on box, I only want that his door will open (play matinee)…

My only idea… Is to do one blueprint for every matinee…
But I think that it sucks…

Someone know another way to do this?

I thank in something like this, but I don’t know how to do it with unreal.

Put the name of the box and the matinee in the same base, like:

  • Box name: “Box01”

  • Matinee name: “Box01_matinee”

  • In the Trigger Box Class c++, do:



string = name_of_the_instanced_box


This string will be taken, when the user use the function, so always will have the last “overlapped box” used.

  • In the LevelScript Class c++, do:


name = cast of string of TriggerBoxClass
name = name+"_matinee"
Play->name_matinee


I don’t know it this is posible… Or really how I have to do this…

Thanks,
Let me know, if you need more information.

Up :slight_smile:
Thanks