Hello, I now have 4 months of experiance and I would like to focus on complex systems, I would like to start with the quest system but I can not build it in my head
if anyone can give me an idea of how to build it!
How to build a quest system
I DON’T ASK TO BE DONE TO ME! I just want to know a little how to build the systeme
So first I’d suggest having a ModuleScript to uh make and hold quests like this for example:
local Quest = {}
Quest.__index = Quest
function Quest.new(player)
local self = setmetatable({}, Quest)
self.__index = Quest
self.Player = player
return Quest
end
function Quest:Complete()
-- how you’d handle stuff here
end
Then you should store the amount of quests completed by the player in a datastore.
Now you’re gonna have to do the above of use another method because quests are usually not completable again (in a lot of games) like a cutscene that only shows up once.
Or an item you can only use once… so you can’t just do some verification like that
I don’t have a lot of experience but I’ve just been using the dialog choice to trigger certain stages in progression. I use a table to indicate what dialogs are left in the quest.
local Quest = {}
Quest.__index = Quest
function Quest.new(player: Player, name: string)
local self = setmetatable({}, Quest)
self.__index = Quest
self.Player = player
self.Name = name
return Quest
end
function Quest:Complete()
-- how you’d handle stuff here
end