Design, where to script levels if not in level blueprint?
I am fairly new to Unreal engine blueprint, but em experienced c++ programmer.
So the question is: Where do you script level specific stuff?
There is a Button actor, and i want to call some actors OpenDoor function, or some other actors ToogleRoomLights function.
Lets say a room has door, window, lights, blending machine... Id go about this in Level blueprint with RoomEvent with Name parameter. Do a switch statement on the name, case 'OpenDoor' id make it call the door actors OpenDoor function, case 'ToogleLights' id call lights ToogleLights function... very simple easy, and fast.
And then the button, i can easily add the button to the level, when it's pressed have it run the level blueprints RoomEvent and pass the variable name to intro the RoomEvent so i can pass 'OpenDoor', 'ToogleLights', 'BlendFruit'.
But it looks like in Unreal engine you should make specialized button actor for each case? Have the button hold actor reference upon which to act, and have dozen different button actors for one room?
Not being able to reference Level blueprint, how do i go about this problem? just make dozen button actors for each case? or how do you do it in Unreal engine?
asked May 19 '19 at 10:15 PM in Blueprint Scripting
You can't access the contents of the level blueprint but you can still access all of the individual actors placed in the level. As a result you could use tags, an enum, a manual check for all actors of class within a radius, etc to find the actors in the level you want to manipulate.
answered May 20 '19 at 05:43 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here