Hi,
I'd like to have the player approach a shop keeper NPC who will then ask if the player would like to see some items to buy. If the player says yes, then the shop UI will pop open (and close the conversation). Is that possible with the Dialogue System?
[SOLVED]NPC Shop UI
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
[SOLVED]NPC Shop UI
Last edited by mschoenhals on Mon Oct 12, 2020 6:50 pm, edited 1 time in total.
Re: NPC Shop UI
Hi,
Yes; that's a very common thing to do.
If you're using another asset such as Opsive's Ultimate Inventory System to handle the shop, then you can typically use the integration's sequencer commands to open the shop UI. Example:
Yes; that's a very common thing to do.
If you're using another asset such as Opsive's Ultimate Inventory System to handle the shop, then you can typically use the integration's sequencer commands to open the shop UI. Example:
- Dialogue Text: "What do you have for sale?" [END]
- Sequence: OpenShop(listener)
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
Re: NPC Shop UI
I have my own shop system. Right now I'm just using a simple trigger to activate the shop UI:
How do I implement that into the conversation then?
Code: Select all
shopCanvas.SetActive(true);
Re: NPC Shop UI
Hi,
If we assume your shop canvas GameObject is named "Shop Canvas", use this sequencer command:
If we assume your shop canvas GameObject is named "Shop Canvas", use this sequencer command:
Code: Select all
SetActive(Shop Canvas)
Re: NPC Shop UI
I use the Lua integration to trigger a shop open script (that way I can do all the different maintenance that I need to do) but it's similar to everyone else's I think:
"We'd like to Shop"
"We'd like to Shop"
Code: Select all
OpenShop(shopID)
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
Re: NPC Shop UI
Thanks Tony! Works great.