Hi,
For the response menu, this screenshot may help. Notice that I removed the Scroll Rect and ScrollBar, and changed the Scroll Content's RectTransform. I also disabled the background Image on the Response Menu Panel.

- expandResponseMenuFromBottom.png (87.96 KiB) Viewed 1289 times
There are two parts to the trader's bark.
First, the trader needs to know what the player has.
Second, the trader needs to bark the text.
The first part depends on how you're handling inventory. In general, you will probably have a C# method to check the player's inventory. These C# methods can be registered with Lua so the Dialogue System can access them. For example, if you're using Opsive's Ultimate Inventory System integration, you'd use uisGetItemAmount(). If you're using More Mountains' Inventory Engine, you'd use mmGetItemQuantity().
Specific Item
If the trader will look for a specific item, it's easier. You can just check if, for example:
uisGetItemAmount("Broadsword", "') > 0.
The second part is easier in this case, too. You can bark the text like this:

- traderBarkBroadsword.png (58.22 KiB) Viewed 1289 times
Random Item
If you need to randomly pick an item from the player's inventory, that's more complicated. You'll need to write a C# method to randomly pick an item. For example, say you write a method to pick an item and set a Dialogue System variable to the name of the item. The method also returns true if it picked an item, and false if the player doesn't have any items to pick. Rough example:
Code: Select all
public bool PickRandomItem() // (Note: This is just example code.)
{
if (playerInventory.numItems == 0)
{
return false; // Player doesn't have any items, so return false:
}
else
{
DialogueLua.SetVariable("desiredItem", playerInventory.itemNames[Random.Range(0, playerInventory.itemNames)]);
return true;
}
}
We'll also assume you've
registered the method with Lua so you can use it in the Dialogue System:
Code: Select all
void Awake()
{
Lua.RegisterFunction("PickRandomItem", this, SymbolExtensions.GetMethodInfo(() => PickRandomItem()));
}
Then your Dialogue System Trigger can look more like this:

- tradeBarkRandomItem.png (57.22 KiB) Viewed 1289 times