How to wait for an inventory selection

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Syoka
Posts: 6
Joined: Sun Apr 21, 2024 1:38 pm

How to wait for an inventory selection

Post by Syoka »

Hello
I want to make a dialogue that:
NPC gives some hints for an item, and pop up the inventory window for player to select item.
then NPC responses according to player showing the right item or not

How to achieve: the dialogue pause when the inventory window pop up, and continue dialogue when player selected an item?
Assume that I made custom Lua function "PopInventoryWindow" to pop up the inventory window
User avatar
Tony Li
Posts: 20677
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to wait for an inventory selection

Post by Tony Li »

Hi,

I recommend using a sequencer command instead of a Lua function for this. Since the conversation waits for the dialogue entry's sequence to end, the sequencer command can wait until the player has selected an item.

Here's an explanation: post 1, post 2. It refers to Inventory Engine, but you can use the same concept with any inventory system/script.
Syoka
Posts: 6
Joined: Sun Apr 21, 2024 1:38 pm

Re: How to wait for an inventory selection

Post by Syoka »

Thank you! it works by sending Message to inventory, SetVariable by script, and then send back message to dialogue database.
User avatar
Tony Li
Posts: 20677
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to wait for an inventory selection

Post by Tony Li »

Glad to help!
Post Reply