IMPORTANT!! If you have trouble with a command, type it into your chat bar. Then post the error message in the comments. (Use @s instead of @initiator) I would also highly recomend using tags instead of coordinates for targeting npcs. But if you're set on using coords, be sure to add "[type=npc," before the coordinates to avoid targeting mobs. If the error message says "no targets match the selector" increase the dx dy dz or the r= by 1 until it works or says something different. If it says "ambiguous too many targets" ensure that you have type=npc before the coords & the correct coordinates listed. Then change your dx dy dz to r=1, or vice versa. If that doesn't work, just use tags.
@@kingboo2981 luckily npcs don't lag :D or rather, they don't move/ pathfind. I had over 100 in a tiny area on a realm and didn't notice a single frame drop. Now there is a way I believe to do it without npcs by adding npc text files into one of the game folders. But aside from knowing that it exists, I don't know much about it. If you're interested though, look up the "dialogue change" cmd.
This guy gave a ridiculous amount of information, tips, tricks, and fixes all in one video. Even learned how to copy old commands on Xbox from this guy. Easily subscribed.
Glad you enjoy!!!! :D Sometimes I worry about adding too much extra info... like maybe should go straight to the point. But personally I do get frustrated sometimes when videos don't go into detail, so that's what I try to doooo :DD
I wanted to make a working Phone and I didn't want to build the actual phone and just tp you there. I knew I could use the dialog command but I didn't know how to use it. Thank you so much for uploading this tutorial.
@@jcjcortz8526 Yay! Glad it makes sense! Thought I might have rambled a bit too much ngl :p It's cool what all you can come up with using this though! Allot of the commenters have blown my mind with what their projects are
Man I wish Mojang would make it so I could make it have complex dialogue without all that since I can’t mentally handle placing so many NPCs for an RPG
@@JuicyBurger29 Yeah, it can get complex pretty quick. Just think about it as 1 at a time :D Tags and signs can also help keep things organized. I'll typically place signs as I go to label stuff. & tags such as quest1, quest1fin
@@OmLedu Okie, time to travel insanely far away so it doesn’t interfere with my map (for some reason bedrock won’t let you place things down in the Nether roof and I don’t play Java as my main since I don’t want my back posture to look like Igor lol)
@sprl5356 yer, the npcs must be within the player's ticking area who is activating the cmd. Aka sim distance. Artificial ticking areas, or trying to target an npc being loaded by a different player doesn't work. But! One commenter mentioned you can use execute at in order to bypass that limitation. I havn't tested it to see, but it would make sense. The execute at would theoretically run the cmd in that location, but end up redirecting it to the player. Sounds solid in theory, but I havn't tried it so can't say haha
love the video. Some info for people (pls pin): Use the /tickingarea command with preload set to true so you can access box dialogue from anywhere, as long as it is in the ticking area If you want the npc to be accessed from a throwable, simply make a repeating command block that executes a command for every instance of the throwable object you choose: /execute at @e[type=] run dialogue open @p Then make the arrow point into a chain command block set to conditional and always active saying: /kill @e[type=] thanks for your time, good luck on building!
Glad you like! I didn't even think about the ticking area to access them from anywhere!! How does the throwable work!? :o Like you throw a snowball & it pops up?? :o
Yes, when you throw the snowball (or any throwable, ranging from eggs to ender pearls to splash potions), it’ll use an execute command that makes the dialogue pop up it then deletes itself with the chain command block
@@Select2Games That's so cool!! XD There's allot about the subs in the execute cmd that I have no clue about. Would be really neat to figure out more! :D
@@nimbiscloud3967 ohh maybe not with the dialogue cmd!? I just tried the tag cmd with the x=, y=, z=, I wonder, I'll have to test it later and see! Cmds can be super annoying ngl x]
@@SorryNeonn If npcs or cmds ever give you troubles, write the cmd in your chat bar to receive an error message that will tell you specifically what is wrong :D Glad you got it a workinnn
Thanks for helping me! All the other videos out there are confusing but you somehow made me understand everything you said in that video, however I do not fully understand what the dx, dy, and the dz stand for. I understand they have something to do with coordinates but why ‘d’?
@@Yomum-zy8lq That's awesome!! Glad I could help :D Idk what the "d" stands for, but it is a modifier for the coordinate. So like dx=1 increases the x coord by 1 So like 100 100 100 with dx =10 dy=-10 dz =1 Would select a box where 1 corner of that box is 100 100 100 and the other corner is 110 90 101
Hi! So I did this down to a T, and it was working great, it stopped working so I typed it into the chat and it told me “Selector for NPCS was too ambiguous and resulted in too many selections, select only one npc” however I was using the coordinates of the npc, as well as there is only one other npc in the world!
@@jenniesworldie How odd! What target modifier are you using. Like @e then coordinates, or @e [type=npc coordinates]? Are you using ~~~ as the 2nd set of coords or like dx=1 dy=1 dz=1? Or are you using r=? If @e coords it could be selecting an animal or something too... so add [type=npc, before the coords. If that doesnt work. Lower the dx dy dz or r= if you can. If using ~~~ switch for r= or dx dy dz If none of the above work, let me know!
@@OmLedu Hey! I’ll write down the ones I’ve tried so far, “/dialogue open @e [x=26.49, y=62.00, z=1414.33, dx=1, dy=1, dz=1] @initiator” When I do this one it tells me “Too many selections, select only one npc” “/dialogue open @e [type=npc, x=26.49, y=62.00, z=1414.33, dx=1, dy=1, dz=1] @initiator” When I do this it tells me “No targets matched selector” “/tag @e [type=npc, r=1] add NPC0” When I do this it tells me “No targets matched selector”
@@jenniesworldie hmmm try adding the type=npc to the dxdydz one. So @e [type=npc, x=, y=, z =, dx=1, dy=1, dz=1] If it says no target match, increase the d 1s until it says something else. If it still selecting too many, try deleting the decimal numbers. If still too many targets, try. @e [type=npc, x=26, y=62, z=1414, r=1] Then if "no targets match" keep increasing the r= until it says something different. I've seen more stable results from dxdydz, but r= can work as well. Coordinates with npcs are a huge pain for some crazy reason. Tbh I would recomend just using tags. Whenever I've tried coords with npcs it either works or it doesn't, but for no explicable reason. The same exact cmd will decide not to work & I never understand exactly why. Oh you said u tried tag and it didnt work.. You ran that cmd while standing inside the npc? O.o
Can you give two things? Like when you say you rob him, you also give him a tag of “criminal” that prevents you from interacting with certain npcs or it forces a different type of dialogue/affects “guard” NPC’s that will attack criminals?
Yes!! But! You'd need to use cmd blockz. At least I havn't found a way to have multiple cmds activate in each slot.. So! The npc's cmd would actually be like /setblock 100 100 100 redstone_block To then activate as many cmd blocks as you desire :D (the 1st one being to remove that redstone block, then chains off of that) I love the idea of tagging to change the possibilities!!! So creative & a really epic way to create more immersion/ rpg stuff :D
@@OmLedu thank you so much for the response! im now deep into experimenting with commands and have 1000 more questions so at this point at least I know how much I dont know
@@Focused_Bedlam It's so cool what you can do! Fun to figure out how to get it to work in a way you want. But super frustrating when you run into problems or just don't know XDD Excited that you started the journey too though!!! I'll help in any way I can! Not an expert though :< lots I don't know as welllll. But questions & answers help us both learn faster! >:D
@@OmLedu A dangerous offer that i will happily take you up on haha One of my MANY questions to start with would be, Is there any way to have the text start at the top of the page when switching between NPC's dialogue? I have A LOT of flavor and story and it always starts at the bottom.
@@Focused_Bedlam I don't believe there is a way to edit the npc UI without mods. There are several ways and options for displaying text on the screen though. Like title will pop up words basically anywhere on the screen that you want. You also might look into the change modifier for the dialogue cmd. From what I've read the dialogue change cmd essentially transforms npcs into different ones via text files that you write, then stick in the world files somewhere. They can even be player specific without using tags. I don't really know how it works, but from what I've read about it makes me think you might enjoy it.
hello! I'm currently working on a complex NPC following your tut and I've run into a slight issue. If the cords are all negative will they affect the = or the command in general? If they do, is there a way to fix that? Thanks :)
@@aqakeldy nope!! Just stick the "-" before the number :D Just keep in mind that npcs must be within the player's ticking area! So on sim 4, all npcs must be within 4 chunks of the chunk the player will be standing in. They don't work with artificially created ticking areas or places being loaded by other players. Also coordinates have given allot of people including myself trouble. I really don't understand why, but sometimes it works as it should but other times you have to keep increasing the selection radius... not spontaneous however! If it works once it works every time. But also with coords, include "[type=npc," in the brackets to prevent targeting animals or mobs that wander into the npcs. Tags are much more reliable ;] That's exciting though!! What is your project going to be?
@@OmLedu thx! :D Next project planning is to mess around with files in either MC or L4D2 to see how badly i'll regret trying to do more "coding-like" things >_
@aqakeldy Ooo fancy!!! There is also a way to do the npc dialogue change with text based files!!! It's suuuuper fancy from what I've read because it can be player specific without tags :o Buuut idk how it works really X]]] There's stuff about it on the wiki though >:D haha
@@nullified5744 I've heard about that glitch!!!! But I've never experienced it. I wonder why it does that XD There is a bug report for it on the mojank bug reports, so maybe be fixed some day lolol But glad i could help!! Happy that you enjoy
Is it possible to have an npc in front of you be replaced with a new one with different linked commands once you click a button?(ex. You bring an item to an npc. You hit a button that removes the item, rewards you and replaces the npc in front of you with a new one linked to new npc’s under the floor, all in one command?
@@N0TE587 Yes! There are several ways you can accomplish that. How I would do it is through tagging the player, then using /execute unless/if cmds. So it would be something like pressing the button sets a redstone block. That block activates a series of cmds. The 1st one would attempt to /execute unless... tag=quest1 run /clear the item from the player. Then on that cmd have a conditional chain that /tag the player with quest1. Then have other cmds that have /execute if ... tag=quest1 run dialogue... /execute unless ... tag=quest1 run execute if ... tag=quest2 run dialogue Etc. Etc. Now 1 problem with that (depending on what you want) is it would still have the same button the next time you clicked on the npc. So you could either make the button a generic response like "about the job...." rather than "here is your item" Or! Instead of the 1st npc having that button to then activate commands you can instead have the npc set the redstone block "upon enter" That will then redirect you to the npc dialogue for whatever tags the player has because the cmd blocks will active before the 1st npc's menus pull up. Hope that makes sense!!! If not just let me know. More detailed examples: Main npc, upon enter /setblock 10,64,10 redstone block That triggers cmds. Impulse Unconditional needs redstone /execute unless entity @p [tag=quest1] run dialogue open @e [tag=npcquest1] @p Then that npc can /clear items, give tag quest 1 to show completion. The next command block also activated by the redstone block would be like: impulse unconditional needs redstone. Execute unless entity @p [tag=quest2] run execute if entity @p [tag=quest1] run dialogue open @e [tag=npcquest2] And so on & so forth. You can also specify multiple tags in the same tag=. So like [tag=quest1, quest2, quest3] There is also a dialogue change cmd that does exactly what you're looking for. But i'm sure exactly how it works, because you have to load the npc data as a text file into the game files in order to access it. Hope that makes sense! If not, just let me know :D
@@N0TE587 Yay!!! I'm super glad that it does :D Anytime!! Always happy to help people make awesome stuff :DD I bet whatever you're working on is super cool!! If you ever wanna share/ brag, I'd love to know :>>
You can have the npc's buttons /setblock x y z redstone_block to activate chains of cmds, so yes. To turn emeralds into xp would be like... /setblock x y z air (to clear the redstone block placed by the npc) /clear @p[hasitem = {item=emerald,quanitity=1..},r=10] emerald 0 1 Chain block Conditional - /xp 1L @p That would remove 1 emerald from the nearest player that has at least 1 emerald within 10 blocks of the cmd block & give that player 1 level. As for depositing and withdrawing.. there are several ways but the scoreboard would be the easiest since it is player specific. Depositing would be similar to the previous one Setblock air /clear @p[hasitem = {item=emerald,quanitity=1..},r=10] emerald 0 1 Chain conditional /scoreboard players add @p bank 1 That would add 1 to that players "bank" scoreboard if they have an emerald after removing 1 emerald. Then could have an option for like 10 and 100 so it's not always 1 at a time. Then to withdraw would be like setblock air /scoreboard players remove @p [r=10, scores={bank1..}] bank 1 Conditional Chain /give @p emerald 1 That removes 1 from the player's bank scoreboard if that player has 1 or more bank score & gives them 1 emerald
Im having trouble. Im teying to get this npc to go to the next dialouge after a button but it just exits the dialogue with nothing happening. Can someone help?
It's acting weird . When I click the advanced settings on npc and back out and go to dialouge (without leaving the npc editing options) it works but when I just try to read the dialouge first it doesn't??
@@rajahharley5727 uh oh! Let's figure out what's wrongg. So the cmd does work as is, just not in the way/ at the time that you desire? Is the command (in the npc) set to button mode, exit or enter?
@OmLedu ok it just started working after spamming it but now for some reason the npc isn't giving me the item I'm requesting. I the command into the bar, works fine but when I try with npc it's no go
I wholeheartedly agree!!!! They are like mostly the same too >.> like derpy nonsense lmao At least make like different archetypes or professions or something! I've wonder how easy it is to add new ones via a mod type thing >.>
@@OmLedu hellooo, for some reason when i did this, it suddenly stops working when i placed the third underground npc. Like the chain of the convos before just stop working as soon as i connect the last npc. Am i doing something wrong?
@@winterwolves5272 How odd! What exactly stops working? If all of it stops working; i would guess npcs got tagged with duplicate tags, so remove all tags and start over tagging. If just the last npc won't connect; check the command & it's tag. If it's a different issue lmk and well figure it out!
@@OmLedu its the command that stuffs up bc it suddenly just doesnt connect the first underground chat to the next one and just closes the screen. I havent been tagging any of them.... maybe is that why? I just thought i wouldnt need to and i can add as many npcs as i need to continue a conversation as long as each command connects to each other. But ye for some reason that didnt work so maybe i need to tag them. Do i just tag them random numbers? Bc i do have other random npcs in the world that came first just in a different irrelevant place.
@@winterwolves5272 So sorry for delayed response!! So you are targeting them via coords? That's fine you don't need the tags! So all of them work except for 1? Try copy/pasting the cmd that isn't working, into you chat bar as a /. That should give you an error message to say what is going on.
hello i want to ask how to hide the npc names that are underground? while also showing the main npc on the surface's name ? The yellow name tag of the underground npcs keeps showing up even when i am on the surface which makes it a bit annoying. Thank you!
Hmmmmmm.... that is unfortunate... If you used tags to select the npcs, just dig under the ones underground to make them lower until you can't see their names anymore. Other than that..... could just delete their names but then the names wouldn't appear in the dialogue either.
I created an npc1(tagged) and npc2(also tagged) then add a command in npc1 /dialogue open @e[tag=npc2] @s Then execute but it didnt work i dont know why If i execute on chatbar it worked but neither command block nor other npcs Edit : i did watch the video again and added rx=1 ry=1 and rz=1 but didnt work neither
@@yaxtrzemski4485 @s only works in your chatbar, for npcs use @initiator @initiator only works in npcs For universal it would be like @p to target closest player.
@@brogi5826 Hmmm r=1 sets a radius limit of 1 around you. C would set a maximum count. Could even use both if needed. R=1, c=1 would select 1 single npc within 1 block of you. But with c=1 you shouldn't even need the r if you stand inside the npc when running the cmd
Hello! Is there a way to make an npc give players written books? I want to make an npc that gives players like a book for them to read when starting the game. Also, is it possible for a player to only use a button once? Like just for that player. For example] the player presses Give Diamond and receives 1 diamond. I want to stop players from spamming it so they don’t abuse that. Is that possible to make it clickable only once just for that player? Thank you.
Yes and yes. So to make things only happen once per player give the player a tag after the final cmd block & have a check for that tag at the start. So for giving diamonds; Execute unless entity @p [tag=diamond] run give @p diamond then a chain that /tag @p add diamond As for giving a book that would need to be the /clone cmd. So you have the book in like an item frame (or maybe a lectern never tried that) /clone x y z x y z x y z lolol so the 1st 2 x y zs will be the coordinate of the book in the item from (or maybe lecturn) or even a chest/ container! The 3rd x y z is the destination. So like / clone 10 20 10 10 20 10 30 30 30 would clone what is at 10 20 10 to 30 30 30 so if it's a chest with a book, it will overwrite the chest at 30 30 30 with the chest that has the book. or if an item frame is cloned not on a wall, then it will just break as it is cloned so the player gets an item frame and the book haha If a chest overwrites a chest, you can't tell anything happened until you look in the chest.
@WildAnmal By adding the /execute unless entity @p [tag=nameofthetag] run /give diamond. So that checks the closest player to see if they have the tag, then if they do, it doesn't run the /give. But if they don't have the tag then it does run the /give. To manually see what tags people have you type like..... i forget... Tag list @target i think
when i use command to move more pages for npc, it doesn't work even though i filled in command and xyz correctly. Pages exits to main screen and doesn't move to next page, i need help.
@@janssenlucena It's either selecting too many npcs, or a mob/ animal. When using coords add "[type=npc," Before the coordinates to avoid animals & mobs. So @e [type=npc, x=10, y=10,....... If that doesn't work & your dx dy dz or r= is above 1. Change it to 1. If your d's or r is already 1, use the other. So if you're using dx dy dz switch to r=1. Or if you're using r=1 switch to dx dy dz. I would always suggest using tags, not coords when dealing with npcs. Tags are full proof and simpler. Where as coords with npcs seem to be super buggy.
In the Advanced NPC Settings try /dialogue open @e[x=#,y=#,z=#,r=1] @initiator # = Coordination numbers of the NPC (the NPC you want the dialogue from) r=1 will only pick any target entity within a one block radius of those coordinates.
@@tinogalente9279 oh no! Type it into you chat bar instead, so that you can see what the error message is. lmk what it says & we'll figure out what's wrong :D
Wait What? Mine isn’t working, when i click the button it doest open the dialogue. Even when i ran this command in chat it said “no targets match selector”
Let's figure it out! So, the no targets match selector means that something is wrong with either the tags, or the coords. Depending on which you used. If you used coords, just double check the coords or increase the dx dy dz to 2 instead of 1. If you're using tags. Double check that the tags are correct (capital vs lower case letters do matter) Also, it will say something like "added tag to npc" if it successfully adds a tag. So double check that as well. If none of that works, try to provide me with as much detail as you can & together we can figure out what is wrong :D (I may take a while to respond though, cuz its 5am here & im heading to beds)
@@SlumpSkull Yeah, coords can be annoying to use >.< It's super easy to miss a negative value, or get the Y value wrong. Lot's of people including myself have done the same. Or the NPC could be standing on the edge of a block.. But let's see! Try making the dx and dz negative (not the dy). So like dx=-2, dy=2, dz=-2 Or try r=2 instead of the d's So [x=10, y=10, z=10, r=2] I have more success with dx dy dz but the r will target more space. If those don't work, increase the d's or the R by 1, until it does select them. Odds are that it's either a missed negative or the Y value. Make sure the Y is their feet. So the coords when you're standing inside of the npc. If all else fails, I would recommend the tagging method! Or you can join my discord in order to post a bunch of pics of everything! Either way lmk if that does or doesn't work & we will get it figured out >:DDD
I tried changing the dx and dz to negative numbers and tried using radius and that didnt work but i did just switch to the tag method and it worked first try!
@@SlumpSkull awesomeeee!!! I really don't understand why coords give so much trouble sometimes. Even the last time I was testing coords for someone else having that problem it was acting strange X] Sometimes it would select them correctly, but other times it seemed to just refuse the targeting. Or like with the "R=" it wouldn't select 1 npc untill the selection box was so big that it would select 2 npcs that were 2 blocks apart -.- lololol but other times, it would just select 1 of them even at a lower radius
I’m having a lot of problems, I have tried both ways but they both don’t work, it doesn’t say there isn’t an error but every time I press the button just leaves
Uh oh! Mb i was asleeppp. Type in the cmd that isn't working into you chat bar, & lmk what the error message is. I wish npcs gave error messages >.< lolol
@@OmLedu in the world me and my friends are building an underground base and we have a tnt mod added to the world so we thought we could make a cool tnt experimentation room and I thought it would be cool if i made a shop that sells the moded tnts, only problem is I don’t know how to make it only give it to the person using the shop so rn it’s set to @a
@@LavaSharkGaming1530 That sounds super awesome!! You can do /give @initiator if the give cmd is inside the npc. Or /give @p to give it to the closest player
@@FireAntMan23 Figured that's what it was. Targeting with coordinates can be frustrating. Let me think..... Try increasing the d's to 2. Let me play around really quick though incase that doesn't work...
@@FireAntMan23 If increasing the d's to 2 doesn't work. Try making the dx and dz negative (not the dy). So like dx=-2, dy=2, dz=-2 Or try r=2 instead of the d's So [x=10, y=10, z=10, r=2] I'm having more luck with dx dy dz but the r will target more space. Either the coords are wrong (maybe the npc is standing on the edge of a block, or missed a negative value?) Or the d's could maybe be selecting in the wrong direction >.> One of those changes should work though >:D lmk if they don't & we'll figure out why
If you're using coords; increase the d's or the r= by 1 until it works or says something different. I would highly recommend using tags rather than coords. If you are using tags; keep in mine that the npc must be within the player's simulation distance. If it is, but still failed to find it; then it isn't taged with the same tag that you are looking for. Remove/ add the tag again.
Uh oh! Let's see if we can figure out why! Type in the cmd that you wrote in the npc, but type it in your chat bar. Then let me know what the error message says! We can get er a workin! You could also join my discord and post a picture of the npc's cmd if you don't wanna rewrite it. & are you on bedrock or java?
@@stolencookie676 What target modifier are you using? @initiator only works in npcs. @s only works in chatbar If not that, in the npc to do have the cmd set to button mode, on enter, or on exit?
Arm disappears? I have no idea o.o Could you join my discord in order to post a screen shot? I'm not too sure what that means haha Are you using any add ons or mods? Ppl on reddit said they had that happen with some add ons
@@DunbyTheCountryBaller If it gives you troubles, just write the command in your chatbar and lmk what the error message say & we'll figure it outtttt. (but in chat bar @initiator doesn't work, so use @s instead)
Uh oh, let's find out! If the command isn't working: type that command into your chat bar & let me know what the error message says. Or if you mean "can't open dialogue on enter" as in when you click on the npc no menu pops up at all, or as in you want a command to 'run on enter': let me know more about what you're trying to do.
@@OmLedu Button mode /dialogue open @e[tag=1] @initiator[type=player] -works On Enter /dialogue open @e[tag=1] @initiator[type=player] -not works On Exit /dialogue open @e[tag=1] @initiator[type=player] -works
@@Maunke. Ah! How interesting! I would guess it doesn't work 'on enter' because it's trying to pull up 2 dialogue boxes at the same time. 1 from the npc you click, then the other from the one the command is targeting.... Especially since the button and exit work.. you may just not be able to use the 'on enter' action with the dialogue cmd.. Let me think..... If you want it to be 'on enter' you might be able to: Have the npc set a redstone block on enter that activates command blocks that are trying to run the dialogue cmds. That way there is a slight delay in the dialogue activation.
@@Maunke. I was wondering the same... I'm guessing you're wanting an npc that automatically changes its dialogue as soon as you interact with it? My best guess would still be using the cmd blocks for the cmds instead of inside npc. But to do that inside the npc... maaaaybe... like the execute cmd? ... idk if that would delay it enough to not conflict though.. 1 question I have is: how will you differentiate between what dialogue gets opened by the player. I'm assuming it's not just 1 dialogue that you want to open on enter. Otherwise you could just have that dialogue in the npc. So, as an example, if there are 2 potential dialogue options on enter, are you going to tag the player to differentiate which gets activated? If so, the "execute if" miiiiiiight work on enter since it will check the player tag before redirecting the dialogue... but it also might have the same issue.... All in all, i would either make a button or use command blocks. The button could be something flavorful like npc dialogue"How's it goin" button:"Well...." Then just have all the cmds set to "on exit" So the button doesn't actually do anything. But once you click it, or close it, it would activate one of the dialogue on exit
@@JackTSBT type the same command in your chat bar to see what the error message says. Lmk what the error is and we'll get er fixed! I wish npcs had the error msg log -.- lolol
@@JackTSBT Woooo!!! Awesomeee, glad you got it figured out!!! Commands can be super frustrating. Especially since npcs don't tell you what is wrong when there is a problem T.T lolol
@@JackTSBT mb I was alseeppp. Just incase you miss the other comment; You could use a circuit of some kind to delay the remove of the activation block of redstone. Ie: clock, daylight sensor, delayed cmd block. But i do believe you could also do that with the scoreboard cmd.. I don't know 100% how all you can use the scoreboard though.... i need to learn more about it!
So sorry!! youtube didn't show me a notification for this comment. Type the cmd into your chatbar with @s instead of @initiator & lmk what the error message says & we'll get it fixed
Oh no! Let's see! Write the command in your chat bar, that you wrote in the npc. Using your chat bar will give you an error message for what's wrong! Let me know what the error message is and I'll try to help you out :D
@@Isnt_available Then it should be written correctly, but the npc doesn't have the tag :o Try re-tagging the npc! Capital letters do matter. I thiiiink it should say 1 entity tagged or something like thag after using the tag cmd... let me double check really quick one sec ...
@@Isnt_available yeah it will say "added tag yourtaghere to NPC" if successful. So stand inside the npc and type /tag @e [type=npc, r=1] add yourtaghere Let me know if it still gives your troubles and we'll do some more troubleshooting :DD
In the Advanced NPC Settings try /dialogue open @e[x=#,y=#,z=#,r=1] @initiator # = Coordination numbers of the NPC (the NPC you want the dialogue from) r=1 will only pick any target entity within a one block radius of those coordinates.
@@georgesuh3770 Yeass, but I'd also recomend adding type=npc in there when using coords, so that a chicken or something doesn't mess it up by wandering into their hole lolol So /dialogue open @e [type=npc, x=?, y=?, z=?, dx=1, dy=1, dz=1] @initiator Or /dialogue open @e [type=npc, x=?, y=?, z=?, r=1] @initiator But tbh, coord targeting with npc is wonky. Almost every comment that needs help is because of coords. So I would highly highly recomend using tags instead of coords.
I’ve spent a year trying to figure out how to do this! Thank you. Did you know that you can get an NPC spawn egg by typing this in the chat?: /give @s spawn_egg 1 51
IMPORTANT!!
If you have trouble with a command, type it into your chat bar. Then post the error message in the comments. (Use @s instead of @initiator)
I would also highly recomend using tags instead of coordinates for targeting npcs.
But if you're set on using coords, be sure to add "[type=npc," before the coordinates to avoid targeting mobs.
If the error message says "no targets match the selector" increase the dx dy dz or the r= by 1 until it works or says something different.
If it says "ambiguous too many targets" ensure that you have type=npc before the coords & the correct coordinates listed. Then change your dx dy dz to r=1, or vice versa. If that doesn't work, just use tags.
is there a way to do this without placing a lot of npcs? I need to make a lot of npcs and am afraid it'll make players lag if there's too many
@@kingboo2981 luckily npcs don't lag :D or rather, they don't move/ pathfind. I had over 100 in a tiny area on a realm and didn't notice a single frame drop.
Now there is a way I believe to do it without npcs by adding npc text files into one of the game folders. But aside from knowing that it exists, I don't know much about it.
If you're interested though, look up the "dialogue change" cmd.
@@OmLedu thank you for letting me know :)
@@kingboo2981 Yeryer!!! Anytime!! I was worried about them lagging as well tbh. But they seem less laggy than an armor stand XDD
They don't lag@@kingboo2981
This guy gave a ridiculous amount of information, tips, tricks, and fixes all in one video. Even learned how to copy old commands on Xbox from this guy. Easily subscribed.
Glad you enjoy!!!! :D Sometimes I worry about adding too much extra info... like maybe should go straight to the point. But personally I do get frustrated sometimes when videos don't go into detail, so that's what I try to doooo :DD
Great video, as ALWAYS🥰
I wanted to make a working Phone and I didn't want to build the actual phone and just tp you there. I knew I could use the dialog command but I didn't know how to use it. Thank you so much for uploading this tutorial.
@@معینتنهایی That sounds super crazy!! :ooo What a cool idea! Glad I could help with your super awesome project
Your system actually makes sense to me. I'll take that from you. Thanks.
@@jcjcortz8526 Yay! Glad it makes sense! Thought I might have rambled a bit too much ngl :p
It's cool what all you can come up with using this though! Allot of the commenters have blown my mind with what their projects are
goated ytber I've never seen a tutorial this perfect sub earned ur the best bro
@@dem_daquavious_johnson_the_3rd
Man I wish Mojang would make it so I could make it have complex dialogue without all that since I can’t mentally handle placing so many NPCs for an RPG
@@JuicyBurger29 Yeah, it can get complex pretty quick. Just think about it as 1 at a time :D
Tags and signs can also help keep things organized. I'll typically place signs as I go to label stuff. & tags such as quest1, quest1fin
@@OmLedu Okie, time to travel insanely far away so it doesn’t interfere with my map (for some reason bedrock won’t let you place things down in the Nether roof and I don’t play Java as my main since I don’t want my back posture to look like Igor lol)
@@JuicyBurger29 The npcs also have to be in the ticking area of the player activating the cmds/ npc! Can't create a ticking area super far away.
@@OmLeduticking areas actually don’t work for NPC’s, they have to be in loaded chunks.
@sprl5356 yer, the npcs must be within the player's ticking area who is activating the cmd. Aka sim distance. Artificial ticking areas, or trying to target an npc being loaded by a different player doesn't work.
But! One commenter mentioned you can use execute at in order to bypass that limitation. I havn't tested it to see, but it would make sense. The execute at would theoretically run the cmd in that location, but end up redirecting it to the player. Sounds solid in theory, but I havn't tried it so can't say haha
This was perfect thank you so much!
Anytime! Glad I could help :D
love the video. Some info for people (pls pin):
Use the /tickingarea command with preload set to true so you can access box dialogue from anywhere, as long as it is in the ticking area
If you want the npc to be accessed from a throwable, simply make a repeating command block that executes a command for every instance of the throwable object you choose:
/execute at @e[type=] run dialogue open @p
Then make the arrow point into a chain command block set to conditional and always active saying:
/kill @e[type=]
thanks for your time, good luck on building!
reply with any possible errors and/or questions =]
Glad you like! I didn't even think about the ticking area to access them from anywhere!!
How does the throwable work!? :o
Like you throw a snowball & it pops up?? :o
Yes, when you throw the snowball (or any throwable, ranging from eggs to ender pearls to splash potions), it’ll use an execute command that makes the dialogue pop up
it then deletes itself with the chain command block
@@Select2Games That's so cool!! XD
There's allot about the subs in the execute cmd that I have no clue about. Would be really neat to figure out more! :D
the tickingarea wont work cuz it the entity wont be loaded in a tickingarea
If you use the coordinates instead of using the dx, dy, and dz, you can just put r=1 in place of it. The r stands for radius
Nice! I also noticed you can just do [x=15, y=15,z=15] not too sure why at the time i was thinking you needed the dx dy & dz tbh >.> lolol
@OmLedu In the npc? If so, I tried that on my switch, and it didn't work.
@@nimbiscloud3967 ohh maybe not with the dialogue cmd!?
I just tried the tag cmd with the x=, y=, z=,
I wonder, I'll have to test it later and see! Cmds can be super annoying ngl x]
@@OmLedu fr
I got about 5 minutes into this video for a project I'm working on, and then realized, "Wait, this is OmLedu!" lol
XD nice!! That's pretty funny X]]
Happy to be recognized & hope I could help :D
1rob @mousearts
@@neal_27 1annieareyouok?areyouokannie?
@@neal_27 lololol that game isn't on here!!! No cheating X]]
you can also use tags like npc1 npc2 etc so like /dialogue open @e[tag=npc1]
@@daloltuber4180 yes, tags are much better to use with npcs than coordinates.
Explained really well!!
Yay! Glad you thought so :D & happy to help!
Months ago it never worked me but now it finally worked😅
@@SorryNeonn If npcs or cmds ever give you troubles, write the cmd in your chat bar to receive an error message that will tell you specifically what is wrong :D
Glad you got it a workinnn
Thanks for helping me! All the other videos out there are confusing but you somehow made me understand everything you said in that video, however I do not fully understand what the dx, dy, and the dz stand for. I understand they have something to do with coordinates but why ‘d’?
@@Yomum-zy8lq That's awesome!! Glad I could help :D
Idk what the "d" stands for, but it is a modifier for the coordinate.
So like dx=1 increases the x coord by 1
So like 100 100 100 with dx =10 dy=-10 dz =1
Would select a box where 1 corner of that box is 100 100 100 and the other corner is 110 90 101
suuuper helpful man thank you!!!!
Yay!!! Glad I can help :DD
Hi! So I did this down to a T, and it was working great, it stopped working so I typed it into the chat and it told me “Selector for NPCS was too ambiguous and resulted in too many selections, select only one npc” however I was using the coordinates of the npc, as well as there is only one other npc in the world!
@@jenniesworldie How odd!
What target modifier are you using. Like @e then coordinates, or @e [type=npc coordinates]?
Are you using ~~~ as the 2nd set of coords or like dx=1 dy=1 dz=1?
Or are you using r=?
If @e coords it could be selecting an animal or something too... so add [type=npc, before the coords.
If that doesnt work. Lower the dx dy dz or r= if you can.
If using ~~~ switch for r= or dx dy dz
If none of the above work, let me know!
@@OmLedu Hey! I’ll write down the ones I’ve tried so far,
“/dialogue open @e [x=26.49, y=62.00, z=1414.33, dx=1, dy=1, dz=1] @initiator” When I do this one it tells me “Too many selections, select only one npc”
“/dialogue open @e [type=npc, x=26.49, y=62.00, z=1414.33, dx=1, dy=1, dz=1] @initiator” When I do this it tells me “No targets matched selector”
“/tag @e [type=npc, r=1] add NPC0” When I do this it tells me “No targets matched selector”
@@jenniesworldie hmmm try adding the type=npc to the dxdydz one.
So @e [type=npc, x=, y=, z =, dx=1, dy=1, dz=1]
If it says no target match, increase the d 1s until it says something else.
If it still selecting too many, try deleting the decimal numbers.
If still too many targets, try.
@e [type=npc, x=26, y=62, z=1414, r=1]
Then if "no targets match" keep increasing the r= until it says something different.
I've seen more stable results from dxdydz, but r= can work as well.
Coordinates with npcs are a huge pain for some crazy reason. Tbh I would recomend just using tags. Whenever I've tried coords with npcs it either works or it doesn't, but for no explicable reason. The same exact cmd will decide not to work & I never understand exactly why.
Oh you said u tried tag and it didnt work.. You ran that cmd while standing inside the npc? O.o
Can you give two things? Like when you say you rob him, you also give him a tag of “criminal” that prevents you from interacting with certain npcs or it forces a different type of dialogue/affects “guard” NPC’s that will attack criminals?
Yes!! But! You'd need to use cmd blockz. At least I havn't found a way to have multiple cmds activate in each slot..
So! The npc's cmd would actually be like /setblock 100 100 100 redstone_block
To then activate as many cmd blocks as you desire :D (the 1st one being to remove that redstone block, then chains off of that)
I love the idea of tagging to change the possibilities!!! So creative & a really epic way to create more immersion/ rpg stuff :D
@@OmLedu thank you so much for the response! im now deep into experimenting with commands and have 1000 more questions so at this point at least I know how much I dont know
@@Focused_Bedlam It's so cool what you can do! Fun to figure out how to get it to work in a way you want. But super frustrating when you run into problems or just don't know XDD
Excited that you started the journey too though!!! I'll help in any way I can! Not an expert though :< lots I don't know as welllll. But questions & answers help us both learn faster! >:D
@@OmLedu A dangerous offer that i will happily take you up on haha One of my MANY questions to start with would be, Is there any way to have the text start at the top of the page when switching between NPC's dialogue? I have A LOT of flavor and story and it always starts at the bottom.
@@Focused_Bedlam I don't believe there is a way to edit the npc UI without mods. There are several ways and options for displaying text on the screen though. Like title will pop up words basically anywhere on the screen that you want.
You also might look into the change modifier for the dialogue cmd. From what I've read the dialogue change cmd essentially transforms npcs into different ones via text files that you write, then stick in the world files somewhere. They can even be player specific without using tags. I don't really know how it works, but from what I've read about it makes me think you might enjoy it.
How on earth do you work this stuff out? Mind blown!
Ikr! So much cool stuff you could do with it! I'd really like to do a complex project one of these days. Make a rpg quest line or something! >:3
hello! I'm currently working on a complex NPC following your tut and I've run into a slight issue.
If the cords are all negative will they affect the = or the command in general?
If they do, is there a way to fix that? Thanks :)
@@aqakeldy nope!! Just stick the "-" before the number :D
Just keep in mind that npcs must be within the player's ticking area! So on sim 4, all npcs must be within 4 chunks of the chunk the player will be standing in. They don't work with artificially created ticking areas or places being loaded by other players.
Also coordinates have given allot of people including myself trouble. I really don't understand why, but sometimes it works as it should but other times you have to keep increasing the selection radius... not spontaneous however! If it works once it works every time. But also with coords, include "[type=npc," in the brackets to prevent targeting animals or mobs that wander into the npcs. Tags are much more reliable ;]
That's exciting though!! What is your project going to be?
@@OmLedu thx! :D
Next project planning is to mess around with files in either MC or L4D2 to see how badly i'll regret trying to do more "coding-like" things >_
@aqakeldy Ooo fancy!!! There is also a way to do the npc dialogue change with text based files!!! It's suuuuper fancy from what I've read because it can be player specific without tags :o
Buuut idk how it works really X]]]
There's stuff about it on the wiki though >:D haha
TYSM!
@@BruhNati Anytime!! Happy to help :D
Thanks it really helped but the only problem i had is the npcs arms dissapear after i click on the next dialogue
@@nullified5744 I've heard about that glitch!!!! But I've never experienced it. I wonder why it does that XD
There is a bug report for it on the mojank bug reports, so maybe be fixed some day lolol
But glad i could help!! Happy that you enjoy
@@OmLeduTurned out just to be a temporary bug fot me, after a minute or two it fixed.
@@nullified5744 good good! I would still like to witness it myself X]] it sounds really funny
Is it possible to have an npc in front of you be replaced with a new one with different linked commands once you click a button?(ex. You bring an item to an npc. You hit a button that removes the item, rewards you and replaces the npc in front of you with a new one linked to new npc’s under the floor, all in one command?
@@N0TE587 Yes! There are several ways you can accomplish that.
How I would do it is through tagging the player, then using /execute unless/if cmds.
So it would be something like pressing the button sets a redstone block. That block activates a series of cmds. The 1st one would attempt to /execute unless... tag=quest1 run /clear the item from the player. Then on that cmd have a conditional chain that /tag the player with quest1.
Then have other cmds that have /execute if ... tag=quest1 run dialogue...
/execute unless ... tag=quest1 run execute if ... tag=quest2 run dialogue
Etc. Etc.
Now 1 problem with that (depending on what you want) is it would still have the same button the next time you clicked on the npc. So you could either make the button a generic response like "about the job...." rather than "here is your item"
Or! Instead of the 1st npc having that button to then activate commands you can instead have the npc set the redstone block "upon enter"
That will then redirect you to the npc dialogue for whatever tags the player has because the cmd blocks will active before the 1st npc's menus pull up.
Hope that makes sense!!! If not just let me know.
More detailed examples:
Main npc, upon enter /setblock 10,64,10 redstone block
That triggers cmds. Impulse Unconditional needs redstone
/execute unless entity @p [tag=quest1] run dialogue open @e [tag=npcquest1] @p
Then that npc can /clear items, give tag quest 1 to show completion.
The next command block also activated by the redstone block would be like: impulse unconditional needs redstone.
Execute unless entity @p [tag=quest2] run execute if entity @p [tag=quest1] run dialogue open @e [tag=npcquest2]
And so on & so forth. You can also specify multiple tags in the same tag=.
So like [tag=quest1, quest2, quest3]
There is also a dialogue change cmd that does exactly what you're looking for. But i'm sure exactly how it works, because you have to load the npc data as a text file into the game files in order to access it.
Hope that makes sense! If not, just let me know :D
@@OmLedu this helps me immensely thanks for taking the time to write it🙏
@@N0TE587 Yay!!! I'm super glad that it does :D
Anytime!! Always happy to help people make awesome stuff :DD
I bet whatever you're working on is super cool!! If you ever wanna share/ brag, I'd love to know :>>
also, the even if you have the npc's in a tickingarea, (pretty sure) it still doesnt work and will say the npc's need to be in YOUR tickingarea.
@@Boxibob whaaaa really!!! I gotta try that and see! That would be so sad!
@@Boxibob omg you're right!! How rude of them!!!! Thanks for letting me know! That's super sad
Can you make ATM USING NPC.
WHEN YOU WITHDRAW ITS EMERALD BUT WHEN YOU DEPOSIT THE EMERALD IT TURNS TO XP
CAN YOU??
You can have the npc's buttons /setblock x y z redstone_block to activate chains of cmds, so yes.
To turn emeralds into xp would be like...
/setblock x y z air (to clear the redstone block placed by the npc)
/clear @p[hasitem = {item=emerald,quanitity=1..},r=10] emerald 0 1
Chain block Conditional - /xp 1L @p
That would remove 1 emerald from the nearest player that has at least 1 emerald within 10 blocks of the cmd block & give that player 1 level.
As for depositing and withdrawing.. there are several ways but the scoreboard would be the easiest since it is player specific.
Depositing would be similar to the previous one
Setblock air
/clear @p[hasitem = {item=emerald,quanitity=1..},r=10] emerald 0 1
Chain conditional /scoreboard players add @p bank 1
That would add 1 to that players "bank" scoreboard if they have an emerald after removing 1 emerald.
Then could have an option for like 10 and 100 so it's not always 1 at a time.
Then to withdraw would be like
setblock air
/scoreboard players remove @p [r=10, scores={bank1..}] bank 1
Conditional Chain /give @p emerald 1
That removes 1 from the player's bank scoreboard if that player has 1 or more bank score & gives them 1 emerald
Im having trouble. Im teying to get this npc to go to the next dialouge after a button but it just exits the dialogue with nothing happening. Can someone help?
So I thought I fixed it but I still need help
It's acting weird . When I click the advanced settings on npc and back out and go to dialouge (without leaving the npc editing options) it works but when I just try to read the dialouge first it doesn't??
@@rajahharley5727 uh oh! Let's figure out what's wrongg.
So the cmd does work as is, just not in the way/ at the time that you desire?
Is the command (in the npc) set to button mode, exit or enter?
@OmLedu ok it just started working after spamming it but now for some reason the npc isn't giving me the item I'm requesting. I the command into the bar, works fine but when I try with npc it's no go
@@rajahharley5727 How odd! Let's see.... Is all the npc cmds set to button mode?
& what target modifier are you using. Ei: @p @initiator @e etc.
We need more npc images other than what we have
I wholeheartedly agree!!!!
They are like mostly the same too >.> like derpy nonsense lmao
At least make like different archetypes or professions or something! I've wonder how easy it is to add new ones via a mod type thing >.>
/tag @e [type=npc, r=1] add NPC0 for people who need CTRL C CTRL V
I usually open up notepad to copy paste too X] don't remember if i mentioned that, but i meant to! Can't believe u can't copy in game -.- lolol
@@OmLedu hellooo, for some reason when i did this, it suddenly stops working when i placed the third underground npc. Like the chain of the convos before just stop working as soon as i connect the last npc. Am i doing something wrong?
@@winterwolves5272 How odd!
What exactly stops working?
If all of it stops working; i would guess npcs got tagged with duplicate tags, so remove all tags and start over tagging.
If just the last npc won't connect; check the command & it's tag.
If it's a different issue lmk and well figure it out!
@@OmLedu its the command that stuffs up bc it suddenly just doesnt connect the first underground chat to the next one and just closes the screen.
I havent been tagging any of them.... maybe is that why? I just thought i wouldnt need to and i can add as many npcs as i need to continue a conversation as long as each command connects to each other. But ye for some reason that didnt work so maybe i need to tag them.
Do i just tag them random numbers? Bc i do have other random npcs in the world that came first just in a different irrelevant place.
@@winterwolves5272 So sorry for delayed response!!
So you are targeting them via coords? That's fine you don't need the tags!
So all of them work except for 1?
Try copy/pasting the cmd that isn't working, into you chat bar as a /.
That should give you an error message to say what is going on.
hello i want to ask how to hide the npc names that are underground? while also showing the main npc on the surface's name ? The yellow name tag of the underground npcs keeps showing up even when i am on the surface which makes it a bit annoying. Thank you!
Hmmmmmm.... that is unfortunate... If you used tags to select the npcs, just dig under the ones underground to make them lower until you can't see their names anymore.
Other than that..... could just delete their names but then the names wouldn't appear in the dialogue either.
I created an npc1(tagged) and npc2(also tagged) then add a command in npc1
/dialogue open @e[tag=npc2] @s
Then execute but it didnt work i dont know why
If i execute on chatbar it worked but neither command block nor other npcs
Edit : i did watch the video again and added rx=1 ry=1 and rz=1 but didnt work neither
@@yaxtrzemski4485 @s only works in your chatbar, for npcs use @initiator
@initiator only works in npcs
For universal it would be like @p to target closest player.
Thanks. Am working on mini game
@@BAGLEGA Oooo fancy!! What kind of minigame is gonna use fancy npcs? :ooo sounds awesome! Makes me super curious
I don't know how should i call it but it's gonna be survival. You can choose biomes between (new biome) pale garden, dark forest and cold taiga
@@BAGLEGA Ooooo fancy fancy! A challenge map or like quest type things? :D
There will be some tasks. And seed is also perfect at the same time.
Seed: 12345
Minecraft ver: 1 .21.60.21
Also if you want can you make video/short about how to use quantity command. I'm trying to learn it
Anyone else run into the problem when tagging using “/tag @e [type=npc, r=1] add PP11” it tags every single entity?!?
Instead of /tag @e [type=npc,r=1] i use c instead of r
Which look like this
/tag @e [type=npc,c1]
@@brogi5826 Hmmm r=1 sets a radius limit of 1 around you. C would set a maximum count.
Could even use both if needed. R=1, c=1 would select 1 single npc within 1 block of you.
But with c=1 you shouldn't even need the r if you stand inside the npc when running the cmd
Hello! Is there a way to make an npc give players written books? I want to make an npc that gives players like a book for them to read when starting the game. Also, is it possible for a player to only use a button once? Like just for that player. For example] the player presses Give Diamond and receives 1 diamond. I want to stop players from spamming it so they don’t abuse that. Is that possible to make it clickable only once just for that player? Thank you.
Yes and yes.
So to make things only happen once per player give the player a tag after the final cmd block & have a check for that tag at the start.
So for giving diamonds;
Execute unless entity @p [tag=diamond] run give @p diamond
then a chain that /tag @p add diamond
As for giving a book that would need to be the /clone cmd.
So you have the book in like an item frame (or maybe a lectern never tried that)
/clone x y z x y z x y z lolol
so the 1st 2 x y zs will be the coordinate of the book in the item from (or maybe lecturn) or even a chest/ container! The 3rd x y z is the destination.
So like / clone 10 20 10 10 20 10 30 30 30
would clone what is at 10 20 10 to 30 30 30
so if it's a chest with a book, it will overwrite the chest at 30 30 30 with the chest that has the book. or if an item frame is cloned not on a wall, then it will just break as it is cloned so the player gets an item frame and the book haha
If a chest overwrites a chest, you can't tell anything happened until you look in the chest.
@
Wow that’s so interesting! But how do you know if an npc or player already has a tag? I’ll try out the cloning technique. Thank you!
@WildAnmal By adding the /execute unless entity @p [tag=nameofthetag] run /give diamond.
So that checks the closest player to see if they have the tag, then if they do, it doesn't run the /give. But if they don't have the tag then it does run the /give.
To manually see what tags people have you type like..... i forget...
Tag list @target i think
@@OmLedu
Thanks! I’ll try it out and let you know how it goes
@@WildAnmal Yeah! Please do :D Your projects sound awesome :D
6:28
@@that1noob554 The tags or the coords? Just curious about the timestamp haha
when i use command to move more pages for npc, it doesn't work even though i filled in command and xyz correctly. Pages exits to main screen and doesn't move to next page, i need help.
type the cmd into your chat bar with @s instead of @initiator, & let me know what the error message says.
Help! Why does it say "Selector for NPCs was ambiguous and resulted in too many selected."😭
@@janssenlucena It's either selecting too many npcs, or a mob/ animal.
When using coords add "[type=npc,"
Before the coordinates to avoid animals & mobs.
So @e [type=npc, x=10, y=10,.......
If that doesn't work & your dx dy dz or r= is above 1. Change it to 1.
If your d's or r is already 1, use the other. So if you're using dx dy dz switch to r=1. Or if you're using r=1 switch to dx dy dz.
I would always suggest using tags, not coords when dealing with npcs.
Tags are full proof and simpler. Where as coords with npcs seem to be super buggy.
100th like and also great vid
Oh nice, that's awesome!! :o
Thank you :DD
Glad you enjoy!!
I click on the box and it does nothing, it doesn't go to the next npc it js exits the first npc and says nothing in the chat neither
@@CraZJDM Type the command into your chat bar, & lmk what the error message says.
Npcs don't have error message feedback -.-
In the Advanced NPC Settings try
/dialogue open @e[x=#,y=#,z=#,r=1] @initiator
# = Coordination numbers of the NPC (the NPC you want the dialogue from)
r=1 will only pick any target entity within a one block radius of those coordinates.
i did mine perfectly i think but when i press a reply it just doesn't send me to the next speech bubble
@@ethan_sims.12345 Type the cmd into your chat bar and lmk what the error message sayz. (Use @s instead of @initiator)
& are you using coords or tags?
Can someone help the /dialogue is not working for me I have pressed the button many times and it still doesn’t work
@@tinogalente9279 oh no!
Type it into you chat bar instead, so that you can see what the error message is. lmk what it says & we'll figure out what's wrong :D
Wait What? Mine isn’t working, when i click the button it doest open the dialogue. Even when i ran this command in chat it said “no targets match selector”
Let's figure it out!
So, the no targets match selector means that something is wrong with either the tags, or the coords. Depending on which you used.
If you used coords, just double check the coords or increase the dx dy dz to 2 instead of 1.
If you're using tags. Double check that the tags are correct (capital vs lower case letters do matter)
Also, it will say something like "added tag to npc" if it successfully adds a tag. So double check that as well.
If none of that works, try to provide me with as much detail as you can & together we can figure out what is wrong :D
(I may take a while to respond though, cuz its 5am here & im heading to beds)
Im using coords and I’ve double check them too. I increased the dx, dy and the dz from one to two and that didn’t work either
@@SlumpSkull Yeah, coords can be annoying to use >.< It's super easy to miss a negative value, or get the Y value wrong. Lot's of people including myself have done the same. Or the NPC could be standing on the edge of a block..
But let's see! Try making the dx and dz negative (not the dy). So like dx=-2, dy=2, dz=-2
Or try r=2 instead of the d's
So [x=10, y=10, z=10, r=2]
I have more success with dx dy dz but the r will target more space.
If those don't work, increase the d's or the R by 1, until it does select them.
Odds are that it's either a missed negative or the Y value. Make sure the Y is their feet. So the coords when you're standing inside of the npc.
If all else fails, I would recommend the tagging method!
Or you can join my discord in order to post a bunch of pics of everything!
Either way lmk if that does or doesn't work & we will get it figured out >:DDD
I tried changing the dx and dz to negative numbers and tried using radius and that didnt work but i did just switch to the tag method and it worked first try!
@@SlumpSkull awesomeeee!!! I really don't understand why coords give so much trouble sometimes. Even the last time I was testing coords for someone else having that problem it was acting strange X] Sometimes it would select them correctly, but other times it seemed to just refuse the targeting. Or like with the "R=" it wouldn't select 1 npc untill the selection box was so big that it would select 2 npcs that were 2 blocks apart -.- lololol but other times, it would just select 1 of them even at a lower radius
I’m having a lot of problems, I have tried both ways but they both don’t work, it doesn’t say there isn’t an error but every time I press the button just leaves
Uh oh! Mb i was asleeppp.
Type in the cmd that isn't working into you chat bar, & lmk what the error message is.
I wish npcs gave error messages >.< lolol
@@OmLedu no its fine i re did it all and it worked so I built a working shop
@@LavaSharkGaming1530 yay!!! That's epiccc! Glad you got it working :>
Auto shops are so cool, what all you selling? :D
@@OmLedu in the world me and my friends are building an underground base and we have a tnt mod added to the world so we thought we could make a cool tnt experimentation room and I thought it would be cool if i made a shop that sells the moded tnts, only problem is I don’t know how to make it only give it to the person using the shop so rn it’s set to @a
@@LavaSharkGaming1530 That sounds super awesome!! You can do /give @initiator if the give cmd is inside the npc.
Or /give @p to give it to the closest player
When i go to put in my command on xbox it disappears if i try to do more then one
@@littleboxtv7432 Then the 2nd cmd isn't working.
Type the cmd that isn't working into your chat bar & lmk what the error message says.
I know I already commented but the command didn’t work for me 8:39 and I checked five times
Uh oh! Let's see what's wrong!!
Type it into your chat bar and lmk what the error message says
@@OmLedu it says “No targets matched selector Failed to find NPC” even though I have one there
@@FireAntMan23 Figured that's what it was. Targeting with coordinates can be frustrating. Let me think.....
Try increasing the d's to 2.
Let me play around really quick though incase that doesn't work...
@@FireAntMan23 If increasing the d's to 2 doesn't work. Try making the dx and dz negative (not the dy). So like dx=-2, dy=2, dz=-2
Or try r=2 instead of the d's
So [x=10, y=10, z=10, r=2]
I'm having more luck with dx dy dz but the r will target more space.
Either the coords are wrong (maybe the npc is standing on the edge of a block, or missed a negative value?) Or the d's could maybe be selecting in the wrong direction >.>
One of those changes should work though >:D lmk if they don't & we'll figure out why
@@OmLedu Oh my god I’m so sorry my y coordinate was wrong
Its not working can someone help its just saying failed to find npc
If you're using coords; increase the d's or the r= by 1 until it works or says something different.
I would highly recommend using tags rather than coords.
If you are using tags; keep in mine that the npc must be within the player's simulation distance. If it is, but still failed to find it; then it isn't taged with the same tag that you are looking for. Remove/ add the tag again.
How to talk to the NCP then he going to give you item
Like you want him to give you a carrot anytime you talk to him?
/give @p carrot
You tell me one thing how to command block place a block
My Minecraft has a big difference
I am complete a one work I am working on a project that's why I need some command knowledge
My username in Minecraft Dizzyorca615037 give me friend request then join my world then you can see what is the problem
Wow
Ikr! I wish I had known this before! So much you could do :o
I followed this perfectly only changing the npc tag and it didn't work
Uh oh! Let's see if we can figure out why!
Type in the cmd that you wrote in the npc, but type it in your chat bar. Then let me know what the error message says! We can get er a workin!
You could also join my discord and post a picture of the npc's cmd if you don't wanna rewrite it.
& are you on bedrock or java?
When i put the command in chat it works but when its in the npc is doesn't.
@@stolencookie676 What target modifier are you using?
@initiator only works in npcs.
@s only works in chatbar
If not that, in the npc to do have the cmd set to button mode, on enter, or on exit?
@OmLedu don't worry. I figured it out I was missing a space lol
@OmLedu while I have you here tho, do you know to connect a command which detects a dropped block to it, that way it can be accessed everywhere?
@@stolencookie676 noiceee
@OmLedu okay I'll try a bunch of stuff until I find something that works good
why does the npc's arm dissapear on my thing
Arm disappears?
I have no idea o.o
Could you join my discord in order to post a screen shot? I'm not too sure what that means haha
Are you using any add ons or mods? Ppl on reddit said they had that happen with some add ons
The /dialogue open @e [tag=(my npc, thats not the actual name)]
With the @initiator
@@DunbyTheCountryBaller What is the error message? Type it into your chat bar with @s rather than @initiator and see what the error message says.
@@OmLeduI think I did, I'm just having trouble linking the npcs but so far your tutorial is correct😅
@@DunbyTheCountryBaller If it gives you troubles, just write the command in your chatbar and lmk what the error message say & we'll figure it outtttt. (but in chat bar @initiator doesn't work, so use @s instead)
@@OmLedu thanks that helped!
My npc can't open dialogue on enter. What is the problem?
Uh oh, let's find out!
If the command isn't working: type that command into your chat bar & let me know what the error message says.
Or if you mean "can't open dialogue on enter" as in when you click on the npc no menu pops up at all, or as in you want a command to 'run on enter': let me know more about what you're trying to do.
@@OmLedu
Button mode
/dialogue open @e[tag=1] @initiator[type=player]
-works
On Enter
/dialogue open @e[tag=1] @initiator[type=player]
-not works
On Exit
/dialogue open @e[tag=1] @initiator[type=player]
-works
@@Maunke. Ah! How interesting! I would guess it doesn't work 'on enter' because it's trying to pull up 2 dialogue boxes at the same time. 1 from the npc you click, then the other from the one the command is targeting....
Especially since the button and exit work.. you may just not be able to use the 'on enter' action with the dialogue cmd..
Let me think.....
If you want it to be 'on enter' you might be able to:
Have the npc set a redstone block on enter that activates command blocks that are trying to run the dialogue cmds. That way there is a slight delay in the dialogue activation.
@@OmLedu Is it possible to create a delay without a command block?
@@Maunke. I was wondering the same...
I'm guessing you're wanting an npc that automatically changes its dialogue as soon as you interact with it?
My best guess would still be using the cmd blocks for the cmds instead of inside npc. But to do that inside the npc... maaaaybe... like the execute cmd? ... idk if that would delay it enough to not conflict though..
1 question I have is: how will you differentiate between what dialogue gets opened by the player.
I'm assuming it's not just 1 dialogue that you want to open on enter. Otherwise you could just have that dialogue in the npc. So, as an example, if there are 2 potential dialogue options on enter, are you going to tag the player to differentiate which gets activated?
If so, the "execute if" miiiiiiight work on enter since it will check the player tag before redirecting the dialogue... but it also might have the same issue....
All in all, i would either make a button or use command blocks.
The button could be something flavorful like npc dialogue"How's it goin" button:"Well...."
Then just have all the cmds set to "on exit"
So the button doesn't actually do anything. But once you click it, or close it, it would activate one of the dialogue on exit
It doesn’t open the Dialogues for me (July 2024)
@@JackTSBT type the same command in your chat bar to see what the error message says. Lmk what the error is and we'll get er fixed!
I wish npcs had the error msg log -.- lolol
@@OmLeduit works now ! 🎉
I forgot to put username at the end of the command 😊
@@JackTSBT Woooo!!! Awesomeee, glad you got it figured out!!! Commands can be super frustrating. Especially since npcs don't tell you what is wrong when there is a problem T.T lolol
@@OmLeduis there a way to make a cool-down to the quests? so you will have to wait until you can do it again ?
@@JackTSBT mb I was alseeppp. Just incase you miss the other comment; You could use a circuit of some kind to delay the remove of the activation block of redstone. Ie: clock, daylight sensor, delayed cmd block. But i do believe you could also do that with the scoreboard cmd.. I don't know 100% how all you can use the scoreboard though.... i need to learn more about it!
The tag command doesn't work for me
@@kareemstillplays uh oh! Let's figure out whyyy. MB for delayed reply though! I was asleep haha
What error message does it say?
Doesn't work😢
So sorry!! youtube didn't show me a notification for this comment.
Type the cmd into your chatbar with @s instead of @initiator & lmk what the error message says & we'll get it fixed
It doesn’t seem to work for me i tried both and it hasn’t worked
Oh no! Let's see!
Write the command in your chat bar, that you wrote in the npc. Using your chat bar will give you an error message for what's wrong! Let me know what the error message is and I'll try to help you out :D
@@OmLedu it says “no target matched selector failed to find npc” i’m using the tag method btw
@@Isnt_available Then it should be written correctly, but the npc doesn't have the tag :o
Try re-tagging the npc! Capital letters do matter. I thiiiink it should say 1 entity tagged or something like thag after using the tag cmd... let me double check really quick one sec
...
@@Isnt_available yeah it will say "added tag yourtaghere to NPC" if successful.
So stand inside the npc and type /tag @e [type=npc, r=1] add yourtaghere
Let me know if it still gives your troubles and we'll do some more troubleshooting :DD
@@OmLedu something still seems to going wrong its saying syntax error. Unexpected “
/tag @e [type=npc, r=1]
I am you big fan from india can you give me a shout out pls 😢
I sure can!!!! So sorry!!!! yt didn't give me notifications for several comments!! T.T
I'll give a shout out in the next video I edit :DD
Shout out :DD
Sry that took so long, silly youtube notifications!!!
ua-cam.com/video/FDENPkvq_Tg/v-deo.htmlsi=T_okJE78ki7-SJ6V
Im ps4 bedrock
@@Abracodwarzone All bedrock is the same. Ps, xbox, switch, mobile, tablet, & pc
It does not work...
In the Advanced NPC Settings try
/dialogue open @e[x=#,y=#,z=#,r=1] @initiator
# = Coordination numbers of the NPC (the NPC you want the dialogue from)
r=1 will only pick any target entity within a one block radius of those coordinates.
@@Beatle111111 Type the cmd into your chatbar & lmk what the error message says.
/give @s spawn_egg 1 51
/dialogue open @e[tag=
@@AlbertFingerNoodleHere_23728 ooo nice! Is that the npc spawn egg? Super helpful!
/dialogue open @e [x=?, y=?, z=?, dx=1, dy=1, dz=1] @initiator
@@georgesuh3770 Yeass, but I'd also recomend adding type=npc in there when using coords, so that a chicken or something doesn't mess it up by wandering into their hole lolol
So /dialogue open @e [type=npc, x=?, y=?, z=?, dx=1, dy=1, dz=1] @initiator
Or /dialogue open @e [type=npc, x=?, y=?, z=?, r=1] @initiator
But tbh, coord targeting with npc is wonky. Almost every comment that needs help is because of coords.
So I would highly highly recomend using tags instead of coords.
@@OmLedu ok thx
I’ve spent a year trying to figure out how to do this! Thank you.
Did you know that you can get an NPC spawn egg by typing this in the chat?: /give @s spawn_egg 1 51
@@EscapazitionMCmaps ooooo!! I did not know that!! Thanks for the tip!!
& super happy that I could help you out