I’m working on my first Unreal title and running into an issue that I can seem to figure out. I’m converting an old 2D project into Unreal, and the first thing I’m tackling is the conversation system. I’ve got the bones of it in and working, but I’ve hit a bit of a wall. I’ve created a new class Conversation that extends Actor. This conversation object contains all the information for a particular conversation the player can have with an NPC. It handles what information is put on the buttons of the conversation UI, and what each button should do when clicked, etc. I’ve created a blueprint TestConversation, that is based of that Conversation class. I want to be able to build all the various conversations as blueprints in the editor, and pass the current conversation object to the conversation hud when it is displayed. I have a method in my conversation hud to set the current conversation, but what I can’t figure out is how to pass a specific conversation blueprint to that method.
Currently I just have the C key bound to toggle the display of the conversation GUI on and off. That code is handled in the player controller blueprint at this point in time. In the actual game, the player will click on an NPC they can talk to, and that will bring up the conversation GUI, but I’m not at that point yet. So for now, I just want to load up this TestConversation blueprint instance into the hud when I display it, but I haven’t been able to figure out how to access it from within my PlayerController blueprint. I’ve tried creating a variable in the player controller, but don’t know how to set the value of that variable to the TestConversation.
Any help would be appreciated.