So I got Sam’s explanation on the limitation of Unity Events. I also think I understood the recommended solution of sub game objects for multiple quest completion components but it’s so unexpected to me as a solution that I wonder if I understood it correctly.
Question 1. Correct me if I’m wrong, but it sounded like Sam’s suggestion requires you to pair up DialogueTrigger and QuestCompletion components for every Quest Objective you want to mark as completed?
Question 2: But this would seem to require knowing in advance how many child game objects to create and thus wouldn’t work if you’re dynamically creating quest instances. Otherwise how many child objects would you create?
To do something more dynamic, my approach would be similar to how we did some of the inventory and pickup stuff in the Inventory course. I’d dynamically spawn as many QuestCompletion objects as I need and establish a relationship between the dialogue trigger and the quest completion object via event registration and invocation in code vs in the inspector.
Again asking because I want to make sure I correctly understood what Sam presented. I tried playing around with Sam’s suggestion in the Unity Editor and I see how it can work for a limited and predefined set of quests and objectives. Assuming my understanding is correct I think I can code this all up myself given what I’ve learned in the series.
If there’s something later in the course that covers this also helpful to have a heads up. I saw a post by Brian about conditions and enums but it seems that is meant for folks who are past the shops and abilities course.
EDIT: correcting small typos.