Collection Quest?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Collection Quest?

Post by QuestHole »

After we pick up the items in the Collection Quest, are they supposed to disappear? Mine are not. How do I make them disappear when they are collected?
Thank you!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Collection Quest?

Post by Tony Li »

Hi,

Are you asking about making the "items" disappear from the player's inventory, or making the chests disappear from the scene?

From Player's Inventory:

The tutorial video's collection quest doesn't actually manage an inventory. It just increments a counter whenever the player enters a chest's trigger collider.

In actual practice, you'll probably use an inventory system -- either one you've programmed, or an asset such as Opsive's Ultimate Inventory System or More Mountains' Inventory Engine. Quest Machine has integration with several inventory assets. These integrations add quest actions to add and remove items from the player's inventory. When you turn in the quest, you'd use a quest action to remove the items from the player's inventory.


From Scene:

The easiest way to make items appear when a quest starts and remove them when the quest ends is to use a Spawner. Quest Machine has actions to spawn and despawn objects. When the quest starts, spawn the items into the scene. When the quest ends, despawn the items that were spawned into the scene.
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Collection Quest?

Post by QuestHole »

I'm just talking about the scene. When the player picks up a chest it should disappear, correct? Mine register as collected but are still there in the scene.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Collection Quest?

Post by Tony Li »

Hi,

Does it work properly in "Scene 3 Final"?

If so, check the chest in your own scene. Its Trigger Event should be configured to send the message "Got" + "Chest" and then deactivate the chest GameObject:

chest.png
chest.png (30.27 KiB) Viewed 986 times
QuestHole
Posts: 29
Joined: Wed Apr 20, 2022 4:08 pm

Re: Collection Quest?

Post by QuestHole »

That was it! Thanks again.
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Collection Quest?

Post by Tony Li »

Glad to help!
Post Reply