Collectible Objects with Conversation & Events
Posted: Wed Sep 02, 2020 9:36 am
Hello!
I have a situation where I have set up a quest which would require the player to collect one object only, out of multiple objects (about 10-15 objects, with unique names & no repetitions).
There's one catch though, that I need a confirmation from the user, before collecting that particular object!
In my scene, I set up one object (parent), which would hold all the collectible objects!
Then, I set up a basic conversation using Dialogue System, which would ask player whether the object should be collected, when player is in proximity of the object and 2 choices would be provided in the response.
I have provided Dialogue System Triggers to every collectible object, and added the action of "StartConversation > OnUse" to each and every one of the collectible objects. Also, every collectible object has collider on it, and isTrigger property of every collider is checked.
Note that all the collectible objects share a common conversation, which I mentioned above.
When player interacts with a collectible object, the conversation would start. That is working perfectly!
What I now want, is that when player chooses one of the responses (for example: "YES" as response), then after that particular response, that particular object, which the player interacted with, should be deactivated and conversation should end, or if player chooses another response (for example: "NO" as response), then the object should remain as is and conversation should end.
I also require the name of the object, which is collected.
I don't know whether that approach is correct, where I am sharing a common conversation across multiple objects.
On one hand, the collectible objects are identical, except they have different names, and all the objects should trigger the same conversation, of confirming the collection, when interacted with, by the player! So due to that, I decided to reuse the same conversation with all collectible objects.
And on the other hand, I require only one object out of those multiple objects to be collected. And as a result of collection of the object, I require the name of object which was collected and that particular object should be deactivated, on confirmation of collection!
Any help would be much appreciated!
Kind Regards,
Bhavin!
I have a situation where I have set up a quest which would require the player to collect one object only, out of multiple objects (about 10-15 objects, with unique names & no repetitions).
There's one catch though, that I need a confirmation from the user, before collecting that particular object!
In my scene, I set up one object (parent), which would hold all the collectible objects!
Then, I set up a basic conversation using Dialogue System, which would ask player whether the object should be collected, when player is in proximity of the object and 2 choices would be provided in the response.
I have provided Dialogue System Triggers to every collectible object, and added the action of "StartConversation > OnUse" to each and every one of the collectible objects. Also, every collectible object has collider on it, and isTrigger property of every collider is checked.
Note that all the collectible objects share a common conversation, which I mentioned above.
When player interacts with a collectible object, the conversation would start. That is working perfectly!
What I now want, is that when player chooses one of the responses (for example: "YES" as response), then after that particular response, that particular object, which the player interacted with, should be deactivated and conversation should end, or if player chooses another response (for example: "NO" as response), then the object should remain as is and conversation should end.
I also require the name of the object, which is collected.
I don't know whether that approach is correct, where I am sharing a common conversation across multiple objects.
On one hand, the collectible objects are identical, except they have different names, and all the objects should trigger the same conversation, of confirming the collection, when interacted with, by the player! So due to that, I decided to reuse the same conversation with all collectible objects.
And on the other hand, I require only one object out of those multiple objects to be collected. And as a result of collection of the object, I require the name of object which was collected and that particular object should be deactivated, on confirmation of collection!
Any help would be much appreciated!
Kind Regards,
Bhavin!