how do i make a dialogue entity?

Started by SleepyWhirl_Alt on

Topic category: Help with modding (Java Edition)

Last seen on 10:09, 9. Jun 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i make a dialogue entity?

hello,

i am trying to make a dialogue entity in my mod that will speak to you once right clicked. i want to make it so the npc will pick random dialogue options from a provided list and then give you the option to answer said question and maybe make something happen, example: my npc talks to me and asks if he can have the coal he sees in my inventory, this dialogue answer was picked randomly from the provided choices. then i want the player to be able to answer through a button with gui, that sort of thing. how would i go about setting this up? the only way i could think of making this work is by making a GUI element for the text box and then having the game pick a random text through a random number generator that calls for the random text choice somehow. the buttons could also be called through the same sort of system, just that they would have to corespond to whats being said. 

got any tips? i would appreciate them lots!

thanks!

Last seen on 00:00, 1. Sep 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
imo the best way is to have…
Fri, 01/26/2024 - 01:54

imo the best way is to have a random number generator using the from 1 to including 10, which is  whole numbers, and then check if the number is 1 say this, and display a gui to th eplayer (you will need many) that has the options in there.

Last seen on 10:09, 9. Jun 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
im gonna try and set up a…
Thu, 02/01/2024 - 05:39

im gonna try and set up a system sometime tomorrow and see how it will work, if anybody else would have an idea just put it here id love to help people with the same problem figure theirs out and maybe make a tutorial video too, im gonna try and write a bunch of dialogue and then have iit call it randomly when the gui is opened