Hello! I have a scene that has many doors. These doors, to open use Matinee, but I am only able to activate this animation through the level blueprint. Is there a way to have a matinee that moves a component instead of a whole object so I can make this door opening script a class blueprint? Or should I continue using the level blueprint and have something that organizes all of the blocks of code that activate doors. I am sure there is some way I can turn this script into a class blueprint, but I’m not sure how. Here is my script.
Any help on how to do this is greatly appreciated. Thanks!
First of all, don’t use Level Blueprint for global game code, aspecially if you planing to make a game with multiple levels, or else you will end up copy pasteing code between levels. Use GameMode class insted, it is made to hold gameplay control code which then you can branch it to different modes with other subclasses.
You also already notice that placing code for individual object in global class (like Level Blueprint or GameMode) is also bad idea You should make objects compact, to way that they can work on themselves, so just place them on level and they work, if you need to place extra code somewhere else in order for them to work it means you doing something wrong. So all things you need to make those door to work you place as component of that actor, insted of trigger box use box component in door actor, if you need actor to work as a component (in this case Matinee actor) use Child Actor Component and so on. After that link those components together with code inside that actor so they work as one single object. I also think you should try using Timelines instead of Matinee.