Starting quest from cutscene or no quest giver

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Reed237
Posts: 16
Joined: Thu Mar 02, 2023 11:12 am

Starting quest from cutscene or no quest giver

Post 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?
User avatar
Tony Li
Posts: 20728
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting quest from cutscene or no quest giver

Post 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
Reed237
Posts: 16
Joined: Thu Mar 02, 2023 11:12 am

Re: Starting quest from cutscene or no quest giver

Post 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
User avatar
Tony Li
Posts: 20728
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting quest from cutscene or no quest giver

Post 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.
Reed237
Posts: 16
Joined: Thu Mar 02, 2023 11:12 am

Re: Starting quest from cutscene or no quest giver

Post 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?)
User avatar
Tony Li
Posts: 20728
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting quest from cutscene or no quest giver

Post by Tony Li »

Hi,

Does your project perhaps have another script named "Health" that's not in a proper namespace?
Reed237
Posts: 16
Joined: Thu Mar 02, 2023 11:12 am

Re: Starting quest from cutscene or no quest giver

Post by Reed237 »

it does.
Last edited by Reed237 on Sat Mar 04, 2023 8:31 pm, edited 1 time in total.
Reed237
Posts: 16
Joined: Thu Mar 02, 2023 11:12 am

Re: Starting quest from cutscene or no quest giver

Post by Reed237 »

hey I found the problem and got it fix thanks for the help
User avatar
Tony Li
Posts: 20728
Joined: Thu Jul 18, 2013 1:27 pm

Re: Starting quest from cutscene or no quest giver

Post by Tony Li »

Glad you got it fixed!
Post Reply