Hey there.
I have a question about the dialogue events functionality:
Is it possible to turn it in some kind of a static event dispatcher? In the tutorial video I see that You’ve used a controller blueprint to interact with other actors. Is there a more modular approach possible?
Essentially I would like for it to work along these points:
- I create an instance of my blueprint that shows a dialog in a level when a player goes near it. (imagine a NPC that starts a conversation when You approach him)
- I chose in the instance which dialogue should be used here. (may be kept as variable in the blueprint - no problem)
- I add some events to the dialogue to make it more influential on the environment and define it’s parameters. (ex. event that would change a light color and I pass in the dialogue node the color value)
- I add listening functionality to some actor’s blueprint (a blueprint class maybe?) that listens for a particular event and does something with it. (ex. a light changes it’s color defined previously in the dialogue)
- I create 5-6 more instances of the light and they should automatically listen for the same event.
- I create a different blueprint that also listens for the light changing event and do something different with it. (ex. when the player choose the red color the gate with the same color opens)
I’ve already tried event dispatchers, but You need a target to bind in to that, and I don’t know how to get an instance of the event from a different blueprint.
Please, let me know if the explanation is sufficient enough and You get what I’m trying to achieve here (reusability is the key). Also, I should mention that I’m new to the Unreal Engine stuff as I previously worked with Unity for couple of years (there I would simply do it with a static event and a Monobehaviour that adds a delegate to it), so this may be a trivial issue or some known design pattern that I can’t seem to grasp.
Thanks in advance and I hope for Your, much needed, support. 