Advanced Dialogue System + Node Editor

I’m pretty sure, for your issue, “Skippable” is set to true in your nodes and you’re clicking/
pressing a button and it might be having an issue because of that. If it is the same issue as mine, I’ve just had to set “Position” to the part’s position so that it doesn’t kick me out wherever I am.

2 Likes

Skippable is set to true, but I wasn’t clicking during that final prompt.
Edit: Even with skippable off, that glitch still happens.

1 Like

Then, I guess you’d have to ask @Sol_ttu

1 Like

Eh, if he’d respond here. It seems inadvertently trying to fix the text issue, conditions have a 50/50 chance of working now, so that’s great. Might have to think of using another dialogue system if these bugs keep arising without OP’s help…

1 Like

Could you send a screenshot of the tree in question so I can have a look at the potential issue.

1 Like

image

1 Like

You must connect the condition to both prompts.

Huh, it was connected before but never saw it disconnect from the other…

Amazing script very helpful but how do I use the node editor to edit the dialogue(get like quests etc?)

@Sol_ttu Noted a minor oversight while testing this out (otherwise fantastic work btw).

Most of the time, to create dialogues or monologues that span multiple pages, you would string together prompts to create the multiple pages, like so:


Then users press a key (or the page itself with the current functionality) in order to progress. Currently, this cannot be done with the base functionality unless the user modifies the code to allow this. In it’s current state, stringing prompts will simply skip to the next at the end of the typewriter (or immediately if typewriter is disabled). It functions much like an autoplay with no user input. This could be problematic for players with slow reading speeds or just want to take it at their own pace. Adding this functionality in would be a great improvement to the system!

EDIT: I wrote a simple patch for anyone that wants this functionality. First you need to declare local currentNode = nil and local CanProceed = false somewhere near the top of the DialogueHandler script located in the DialogueUI. Next, you’ll want to go to the function handling prompts and modify the code under line 280 (where it says SkipTyping = false. Normally, there’s a bit of code that says LoadNodes(GetOutputNodes(Node)). Delete this and replace that section with the following (you can ignore the print though).

Finally, we’ll want to allow the player to proceed on click of the dialogue box, much like they do to skip the dialogue. To do this, look for the PromptFrame.Activated function a bit lower in the code. Then insert this if statement.


Should you have typed everything correctly, the result will allow you to string prompts in a row as shown in the first screenshot of this post WITHOUT having it autoplaying. Rather, like you would click the text box to skip text, you will also click to continue to the next prompt.

I hope this helps someone! Cheers!

8 Likes

That indeed is an oversight I should’ve noted beforehand. I’m currently a tad busy but when I have time I’ll see about implementing a feature like that into the system natively. Your current method seems to work quite nicely and will probably function almost indentically to how I’d make it. Thank you for bringing this to my attention and I’m glad you could resolve it and share your idea with others.

1 Like

It’s all good. I’ve been super busy with coursework so I understand. I’m glad to hear my method seems to be along the right track of how to fix the issue!

For some reason, when I talk to an npc and it activates the dialogue, it’ll never open the dialogue again after the first time.

Can you share the node layout and the code you’re using to activate the dialogue so that I can
possibly diagnose the issue.

local rs = game:GetService("ReplicatedStorage")
local remotevents = rs.DialogueEvents
local dialogues = rs.Dialogues
local remote = remotevents.DialogueRemote
local prompts = game:GetService("ProximityPromptService")
local prompt = script.Parent

prompt.Triggered:Connect(function(plr)
	remote:FireClient(plr, dialogues.Joe)
end)


It stops working after the first time I activate the dialogue. And also the command doesn’t work, when I press the response at the top side, it freezes, doesn’t do the command and also doesnt do the prompt.

local Module = {}
local ss = game:GetService("ServerStorage"):WaitForChild("Item")
local Fruits = ss.Fruits.Fruit
local pika = Fruits.Pika
local storebutton = game.ReplicatedStorage.Store

function Module.Run()
	local plr = game.Players.LocalPlayer
	local clone = pika:Clone()
	clone.Parent = plr.Backpack
	local clone2 = storebutton:Clone()
	clone2.Parent = clone
	print("pika cloned")
end

return Module

Heres the function

Edit: Also how do I set the name of the npc?
image

Ah, I think I know what the issue is. The reason why it doesn’t work is because the command is being activated on the client side and client side cannot access ServerStorage.

oh ok so I’ll just clone the tools inside the modulescript so it’ll take it from there nstead

If you’re moving tools to the player I’d rather have the command fire a remote to the server that then moves the tools to the player.

wouldn’t that be really exploitable tho?

You can make it as secure as you want, but that’s the way anyone would do it. Besides, exploiters work through the client side, so having items be moved from the client could be done by exploiters either way. So actually it’s more secure than your old method.