Shop UCC Stop Movement

Hiiyan90

New member
Hello!

Is there a way I can stop the UCC character movement while the shop menu is open like the main menu? My normal inventory works perfectly now so I have some good integration going. In the demo it works but I am using InControl so maybe that's creating a problem?

I feel like there must be a similar way than whatever I am trying so I thought I'd reach out! I can't find much on this in the docs.

If there is a way to just say "turn off the UCC controller when menu is open" this will help me with lots of future features I hope to add too.

Cheers!
 
There is a "OnEnableGameplayInput" event you can call to enable/disable the character input.

So what you could do is listen to the event that opens the menu to know when to enable/disable player input. You have the choice between these 3
c_GameObject_OnPanelOpenClose_PanelEventData
c_GameObject_OnNewPanelSelected_PanelEventData
c_GameObject_OnGameplayPanelSelected_Bool
They are all explained in the EventNames class.

Note that I believe there's an option to do this automatically on the Display Panel Manager or on the Inventory System Bridge. That being said sometimes you'll want more control and writing a custom script gives you that
 
Thanks a lot, I will have a play around.

Yeah, it's odd because nothing in the Display Panel Manager affects the shop inventory. Only the main so the click-box for input and timescale doesn't seem to be working unless it's the main inventory. I tried separating the shop to a new canvas with a different display panel manager but that didn't work yet either. I will keep trying.

Thanks!
 
Oh great, I found it! It was actually very simple... I did not have "Is menu panel selected" on the shop. I noticed this referencing the demo and didn't notice by default on the schema for the shop it was not selected.

The event code is going to be very handy though so thanks for pointing that out!

Cheers for your help!
 
While I have you, I have noticed the old Inventory List component where I used to filter sell items is now gone in the newest versions? What is used now to filter what can and can't be sold? Thanks again!
 
You can either change the contents of the Shop Inventory
or if you want to do it on the UI you can use the UI Designer schema to add filters and sorters. This automatically filter&sorter components for you, creates a "ItemInfoMultiFilterSorter" component and sets it in the "ItemInfoGrid" component.
 
Thanks very much. I meant in particular the sell function back to the shop. For example, I don't want the player to be able to sell any key items that will be relevant for quests and story. This is done the same way?
 
Top