QuestBase
The base class for all quests. Contains methods that are shared between all quests.
Functions
Destroy
QuestBase:Destroy(Flag: "NoReplicate"?) → ()Destroys the quest. Cleans up all objects and connections. If there is a QuestReplication object, it will be destroyed as well.
Add
QuestBase:Add(Method: string?) → ()
Adds an object to the quest's janitor. This will automatically clean up the object when the quest is destroyed.
The object can be an instance, a signal, or a function. If the object is a signal, the janitor will disconnect the signal when the quest is destroyed.
An optional second argument can be passed to specify the method to call on the object when the quest is destroyed.
Example: Quest:Add(Signal, "Disconnect")
Clone
Clones an object and adds it to the quest's janitor.
PlaySFX
Plays a sound and adds it to the quest's janitor.
Finalize
This item only works when running on the server. ServerQuestBase:Finalize() → ()Finalizes the quest, which will prevent the quest from being updated and allows a new quest to be started. Will automatically send a Finalize event to the client QuestFX.
UpdateServerState
This item only works when running on the client. ClientQuestBase:UpdateServerState(StateAction: string,...: any) → ()Sends a request to the server to update the quest's state. Received by the Quest:OnStateUpdate method.
Finalize
This item only works when running on the client. ClientQuestBase:Finalize() → ()Finalizes the quest, which will prevent the quest from being updated and allows a new quest to be started.