Page 1 of 1
Starting quest from cutscene or no quest giver
Posted: Thu Mar 02, 2023 11:25 am
by Reed237
Hi, I'm trying to start a quest from a conversation, where there is no accept quest option. the quest will require you to kill two bandits and it will activate a Trigger upon Quest completion. your tutorials only explain how to accept the quest from NPC's can you explain how to do it without them?
Re: Starting quest from cutscene or no quest giver
Posted: Thu Mar 02, 2023 1:18 pm
by Tony Li
Hi,
Here are some ways to do that:
- You can add the quest to the player's Quest Journal and specify Autostart Conditions. The quest will become active in the player's Quest Journal when the conditions are true (e.g., "# bandits killed" counter is >= 2).
- Or you can create an empty GameObject and put a Quest Giver component on it. Use this GameObject to give the quests to the player's Quest Journal, for instance by configuring an event to call the Quest Giver's
QuestGiver.GiveAllQuestsToQuester() method.
- Or you can use a script to activate the quest. See:
How To: Start Quest From Script
Re: Starting quest from cutscene or no quest giver
Posted: Fri Mar 03, 2023 11:04 pm
by Reed237
Hey I'm stuck I'm using the Top Down engine and I've implemented the integration, but I can't seem to get the enemies to send the kill message I've looked at the Top Down demo but the onDeath component is missing can you tell me what component the enemy needs to send kill message
Re: Starting quest from cutscene or no quest giver
Posted: Fri Mar 03, 2023 11:33 pm
by Tony Li
Hi,
Make sure you've imported both "TopDown Engine Support.unitypackage" packages. One is in Common/Third Party Support and the other is in Quest Machine/Third Party Support.
Then add an OnDeathEvent component to your enemy. You can also add a QuestControl component, and configure the OnDeath() event to call QuestControl.SendToMessageSystem. (Don't connect it to QuestControl.SendMessage.)
See the KoalaNinjaPatrol GameObject in the TopDown Engine Example scene for an example.
Re: Starting quest from cutscene or no quest giver
Posted: Sat Mar 04, 2023 12:17 am
by Reed237
hey I'm getting these types of Errors
Assets\Pixel Crushers\Common\Third Party Support\TopDown Engine Support\Scripts\OnDeathEvent.cs(20,36): error CS1061: 'Health' does not contain a definition for 'OnDeath' and no accessible extension method 'OnDeath' accepting a first argument of type 'Health' could be found (are you missing a using directive or an assembly reference?)
Assets\Pixel Crushers\Common\Third Party Support\TopDown Engine Support\Scripts\TDECharacterSaver.cs(53,26): error CS1061: 'Health' does not contain a definition for 'InitialHealth' and no accessible extension method 'InitialHealth' accepting a first argument of type 'Health' could be found (are you missing a using directive or an assembly reference?)
Re: Starting quest from cutscene or no quest giver
Posted: Sat Mar 04, 2023 9:40 am
by Tony Li
Hi,
Does your project perhaps have another script named "Health" that's not in a proper namespace?
Re: Starting quest from cutscene or no quest giver
Posted: Sat Mar 04, 2023 8:04 pm
by Reed237
it does.
Re: Starting quest from cutscene or no quest giver
Posted: Sat Mar 04, 2023 8:30 pm
by Reed237
hey I found the problem and got it fix thanks for the help
Re: Starting quest from cutscene or no quest giver
Posted: Sat Mar 04, 2023 8:46 pm
by Tony Li
Glad you got it fixed!