Alright, ran into another bug. Basic timers do not work inside of the event bp’s (I assume its no different for conditions). This is getting to be a bit much. We love the plugin but these issues need to be addressed. Just to recap, the current bugs are as follows.
Events are double firing causing serious issues. It breaks the plugin and we are relying on proper event firing.
Unexposed variables showing up when they shouldn’t.
Unexposed variables (if clicked on in the dialogue tree) have tendency to crash the engine.
Timers are not working. The BP’s are compiling with no errors or attempt by the system to remove the nodes.
Any ETA on when will these issues will be taken care of Code spartan? The event bug is really holding us back.
Worked on an update today, will be sending it to Epic in a few hours. They usually approve new versions within 3-4 days.
List of changes:
Good idea, added this.
Thanks for the report, fixed it.
Also found that empty NPC nodes don’t fire any events, so I fixed it as well.
Fixed it.
Also, remember when I say in the tutorial that you have to access things through PlayerController? That is no longer the case, as you now have access to nodes like GetAllActors, SpawnActor, Linetrace, etc.
Added a category called “DoNotShow”. If you put a variable into that category, it will not be exposed to dialogue nodes. That category won’t exist by default in your conditions/events, so just create it and put your variables into it.
Each line(aka node) has a nodeid, so instead of getting the next node, you can get a random one instead. You’d have to modify the dialoguewidget, where it requests the next logical node. If you go a bit more into detail, I’ll be able to give more precise information.
is it possible for some lower level beginner tutorials for working with events and conditions? i am having a problem doing anything with the plugin as far as dialogue events go.things i want to do
when a answer is chosen (examine) do a fly around of the npc. i am guessing this will be using the sequencer but not to worried about this one currently…
the other thing is i have made my npc’s all randomly generate stats. and i have these stats displaying on a widget and i wish to show this widget for the specified npc but cant figure how to reference it from the event dialogue blueprint you instruct in tutorial for creating events… some handy small tutorials would be great to give me a idea on some things… i am only 3-4 months into unreal so excuse my lack of knowledge i am trying to learn all that i can
on another note i notice when you create a dialogue event is has considering player and npc actor nodes on override event
what are these for?
When you create your widget, save a reference in gameinstance. Gameinstance is a persistent singleton that exists while the game is running, isn’t replicated, and transitions between levels. It’s very typical to store umg references into it. Then access the reference by getting game instance from events/conditions.
As for the camera flying around, I never did anything like that and I’m not familiar with the sequencer, so I can’t answer that. I’d suggest you join Unreal Slackers, it’s a discord channel for ue4 users of all level, and there’s a strong chance that you’ll find help there with all kinds of questions you may have while learning unreal.
I slightly modified DemoDialogueWidget and DemoReplyWidget to achieve what you basically have in Witcher 3. It’s very basic, so if you need to modify it further, you should be able to. Here’s what I did:
In DemoDialogueWidget, create a variable ‘CurrentPlayerNode’ of type ‘DialogueNode’. Create a variable ‘PlayerReplyTimer’ of type TimerHandle.
That should do it. When you click on a player reply, it’s now going to be displayed for the duration of the sound file. You’ll also have a “continue” button. If you use the dialogue waves, you’ll have to slightly alter the code, but it should be fairly easy.
It’s a good addition. I’ll add all this code to the 4.20 version of the plugin, the 4.19 version already having been submitted.
Depends on the implementation that you want. If I was making an RPG, I’d insert two enums. One for facial morph targets, like “angry expression”, and another for gesticulation (hands, body posture, head movement, etc). And I’d just have two arrays of animations on an NPC, and play whichever was selected in the two enums.
If a special animation had to be played, I’d add an anim montage field. I’d be adding those things in Dialog.h, right where “isPlayer” variable is. Adding a UPROPERTY with appropriate fields to a variable would automatically expose the variable just like “isPlayer” is exposed.
Let me know if you need a more in-depth explanation on that.
Firstly, thanks so much for the quick reply! Your solution SORT OF works… It’s playing the PC audio now which is awesome, however I had to add in a delay based on the duration of the NPC audio to avoid audio doubling if the player clicked on their next choice before the NPC finished talking. Figured I’d point that out before you implement it into the next update.
http://torquemod./NPCAudioDelay.jpg
Also, you had the PC text being pushed to the “Next Button” slot after you choose your reply which is confusing because instead of saying “Continue” it was filling it with the response that you just selected so I broke that and just entered “Continue” into the Set Text Slot so it always shows as a continue button when it needs to. Also the way you had it configured if you clicked on that PC response that was filling the Next button text while the player audio was playing, it would skip to the next NPC line without waiting for the player audio to finish playing so you got audio doubling again. I added in another delay based on the duration of the PC audio which fixed this but it would be nice for “captioning” purposes if I could have the player responses clear the previous NPC text and appear in that same spot. Then anyone playing without audio would still get a chance to read the response as it plays. It’s not a huge thing though since you do get to read it before you click on it. I’m sure I could get it working if I try as it’s likely just a matter of playing around with the nodes in the dialogue widget, it’s just taking me a while to figure out where everything is.
As for the animations, I can’t code C++ yet so I was hoping for an easy way to trigger them via blueprint. I was thinking I could just fire an event off of each NPC Answer node in the Dialogue that triggers a custom event inside my NPC blueprint which plays a canned animation. I’m guessing your event system tutorial would show how to do this but I haven’t watched it yet.
Sorry, I was updating my post as I worked on it so I figured all that out as you were replying. Didn’t expect you to reply so fast Looks like you replied to a version while I was still playing around.
I got it working mostly and figured out that I can hide the mouse cursor after the Event Destruct is called so no worries there.
In the Dialogue widget I made the mistake of connecting the “Next Text” into the Set Text node instead of the "NPCtext" so that fixed the issue with the PC dialogue showing up as the continue button.
The “Continue” button does flash on for a split second just before the NPC text is displayed which is odd.
I also didn’t know what you meant by add a second delay to the Set Timer by Event node. I just put a standard delay node in between the Clear Children of the Player Vbox and the Set Visibility of the Next button.
Had to resubmit again, since Epic have some problem with building plugins for IOS due to an internal bug.
The 4.19 version will be unavailable for Mac until they fix it.
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.
I was wondering the network capabilities of this project. We are working on an MMO and we need a dialogue system that we can incorporate with our quests. I was wondering the network replication capabilities of This system in particular.