Page 1 of 1
Collection Quest?
Posted: Fri Apr 29, 2022 4:01 am
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!
Re: Collection Quest?
Posted: Fri Apr 29, 2022 9:49 am
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.
Re: Collection Quest?
Posted: Fri Apr 29, 2022 10:51 am
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.
Re: Collection Quest?
Posted: Fri Apr 29, 2022 11:07 am
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 (30.27 KiB) Viewed 987 times
Re: Collection Quest?
Posted: Fri Apr 29, 2022 11:19 am
by QuestHole
That was it! Thanks again.
Re: Collection Quest?
Posted: Fri Apr 29, 2022 2:34 pm
by Tony Li
Glad to help!