Blueprint Dialogue System

:stuck_out_tongue: no worries! The font face/size/bold etc… is in UI_Dialogue_TextItem and UI_Dialogue_ResponseItem, the UMG Text widget needs to be set directly because we can’t do it through Blueprint (as far as I know)

OnMouseButton____ is actually a bindable event in UI_Dialogue on the imgClickZone control

Oh duh, I’m blind- everything works now, thank you very much for your help today :slight_smile:

Great! Any time :slight_smile:

This is seriously the very last thing, because the system works perfectly, but do you have any advice for how to call BPC_Dialogue’s Event Use from C++? The way I’ve always done this in the past is by implementing all of my events in a base class and extending it via blueprint, but I’ve never tried calling any of BP’s virtual stuff directly from code. The way my interactable system is constructed, the character a BPC_Dialogue is on is the one who gets a Talk/Use/Whatever message, and since they don’t share any scope with the dialogue BP I can’t build an interface or common messaging framework between them.

Hmm, one way would be to have the character implemented in Blueprint (derived from your C++ character), and override it’s interact function, which could GetComponents by Class (BPC_Dialogue) and call its ‘use’ event?

The only way that I know of to communicate directly to a blueprint without inheritance is to use UE4’s C++ interfaces, but if your character is the one that receives the event, it might be more convoluted than it needs to be

Those are both good suggestions, I’ll see if I can get it working semi-elegantly in interfaces tomorrow… I think doing it through the character blueprint would be cleaner, but some of the things you can talk to don’t inherit the character blueprint (signs/items/system messages), so I think trying to cram a C++ interface down both component’s throats is probably the way to go. Thanks for the suggestion! :slight_smile:

I can see that, it makes perfect sense to me.

If this isn’t already how you’re approaching it, I would recommend creating a child blueprint for BPC_Dialogue for all of your dialogues instead of altering the base files, this way you can receive updates without too much trouble in the future.

Yup, that’s what I did… anything that I touch gets its own child. :slight_smile:

This is probably stupid, but do you have any idea if it would break anything to reparent BPC_Dialogue from UActorComponent to one of my C++ classes which is a child of UActorComponent? I’m assuming there are reasons not to do that, but if that didn’t break anything it’d solve everything right away, because my messaging system uses that subclass and I could just create a new blueprintimplementableevent in my intermediate class between UAC and BPC_Dialogue.

That shouldn’t be a problem, the current parent (BPC_UseActionHandler) is only used for the interact system that you are replacing, which is a child of UActorComponent

You’re right, that did the trick perfectly, and with a lot less inheritance/interface headaches- thank you ever so much for your help getting it running, I feel like I got several hundred dollars of value from the purchase + your time :slight_smile:

My pleasure, :slight_smile:

If you wouldn’t mind, it would be helpful to get your rating and maybe a comment on the store page.

I’m very happy to hear things worked out!

Sure thing, no problem at all :slight_smile:

It’s appreciated, thank you!

Ok,
so i said “test it deeply” but right now it’s more like “hitting a wall” XD

I read through the help and also saw your video-tutorials, but because i can’t trust in what i see (i mean i forget it quickly) xD i’m running into a problem now.
Tried to implement the system in my game, but after adding the bpc_dialogue child into my npc character and the scanner into my character, when i play it it’s like the scanner is ignoring the npc at all.

Tried the same with a cone/static mesh and worked ok.
Tried adding the skeletal mesh directly to the map and worked ok.

Then i decided to go back to your example (i thought that maybe was some kind of error with using blueprints instead of just skeletal or static meshes). So i turned the sign post into a BP just to find that everything works the same except that the alternate layout doesn’t shows up. Everything is shown under the basic layout. But still was almost working and fully detected by the scanner.

Then tried one more thing; duplicated the Third person player character blueprint, called it NPCCharacter just for reference. Got rid of all the event graph nodes and the camera component. Got rid of the scanner too and just added the BPC_Demo_Topic to it, saved, tested and… voilá! the character gets ignored and the system doesn’t work :confused:
Probably it’s just me that i’m missing some important step but i can’t find what it is.

Can you please point me in the right direction?

After some more testing I’ve found more specifically what is what’s not working with the system.
The scanner detects everything but others Character Class Blueprints. So yeah you can interact with Pawns, Actors, … but not with others Character Blueprints.
Is there anything special you have to do to work with Character BPs or is it just a bug?

I’m having a look to see if I can replicate this issue, I’ll keep you posted

The reason it isn’t working on a character is because the scanner uses the ‘visibility’ channel, which is disabled in the character. I’m not certain why it’s off, it doesn’t seem to have any negative side effect in my project to enable it though.

Alternatively, if you need the character’s visibility channel to not collide, you can create a new channel and replace the traces in BPC_UseScanner with that new channel (of course, all of the actors would need to set their collision parameters accordingly)

Thanks for bringing this up! I’ll update the documentation with this info :slight_smile:

Oh! so that’s why. Then i guess i’ll change the visibility channel in the a per-character-bp basis to avoid any issue that explain why it’s disabled in characters. Not a problem :slight_smile:

No problem mate, i’ll keep on my testings ^^. If any other strange thing arises i’ll keep you posted.

Ok,
so far so good. I’ve been doing some more testing and implementing into my game.

And now run into another weird behaviour. I don’t want to use the mouse so i went to BPC_Dialogue and got rid of that “Set ‘Show Mouse Cursor’ to true” to avoid showing the mouse cursor. But when i test it as soon as i speak to anyone and the dialog box appears, the cursor does too. Is there any node hidden overthere that’s forcing the mouse to show up?


EDIT: Hmmm, looks like that the node “Set Input Mode…” (to whatever being it only UI or Game and UI) forces the cursor to show. If i can’t find a way to override that i’ll probably end up getting rid of that node too…

Hi Meguido,

You don’t need to alter the core files to achieve this, simply set the component’s input mode to “unmanaged” and it shouldn’t trigger the cursor at all.