#dialogue system

1 messages · Page 1 of 1 (latest)

honest spade
#

i wanna make a dialogue system using OOP (object oriented programming) but i havent been able to understand OOP at all. whats a base idea i could go off of? (im not asking for an entire script)

the system goes:
prompt the npc
gui pops up with text
deletes after clicking

radiant sparrow
honest spade
#

since i wanna use the same system with multiple npcs

radiant sparrow
honest spade
#

dont know what that is, ill watch a few tutorials

#

or dev forum

radiant sparrow
#

When the dialogue is triggered you could retrieve the first dialogue from atable

#

You can have like

polar schooner
#

Collection service basically means that for example u have 2 killbricks all with the same script and that's when collection service comes in to optimized those script and organized it

honest spade
#

so with collection service you can modify one of the killbricks?

radiant sparrow
#

{
["NPC1"] =
{
["Dialogue1"]
};
};

radiant sparrow
#

Or even better, you could create one using instance.new()

#

Then connecting the dialogue function to the proximity prompt

polar schooner
#

Btw I think u should use oop becuz u wanna reuse the program of it

#

Like manipulating the data

#

U wanna make multiple dialogue with different lines right?

honest spade
#

the problem with oop is that im having trouble understanding it and metatables

polar schooner
#

Meta tables is basically to manipulate the table

honest spade
#

which is why i asked for how i could make the system with oop in the first place to understand it better with something i wanna make

radiant sparrow
#

I don’t have mastered OOP at all, but I use it for custom classes

#

Like guns, cars, etc.

honest spade
#

would it be used for characters in a combat game?

polar schooner
#

Yes

radiant sparrow
#

Yes

#

Abilities

#

And the character itself

honest spade
#

i already somewhat understand that its a way to not repeat yourself and be efficient

radiant sparrow
#

Yah

honest spade
#

but im having trouble setting the actual code up

polar schooner
#

YouTube has lots of tutorials

#

U can refer

radiant sparrow
#

Once you remember it it’ll be easy to use it

honest spade
#

alr ill keep searching