save menu and invector inventory issues

Announcements, support questions, and discussion for the Dialogue System.
glen
Posts: 13
Joined: Mon Nov 22, 2021 10:06 am

save menu and invector inventory issues

Post by glen »

Hi there just a quick one that I hope somebody can help with. I have the Invector TPC and trying to use the Dialogue system save system, it all works fine until I use the Invector inventory / item manager then even though the mouse cursor is there it does not click on the save / load menu if I try use it after that. I cant seem to be able to find any other similar issues in other posts. Hope you can help, thanks in advance.
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: save menu and invector inventory issues

Post by Tony Li »

Hi,

Did you add the Scripting Define Symbol USE_INVECTOR_INVENTORY?

What save/load menu are you using?
glen
Posts: 13
Joined: Mon Nov 22, 2021 10:06 am

Re: save menu and invector inventory issues

Post by glen »

Hi there, sorry for delay I was taking a break for a couple of days (got drawn into a new game i got on sale lol) I installed the needed components and the saver key today so it is great and saving my inventory too which is awesome.
(anyone who has issues finding the InvectorInventorySaver component you can find the script in the scripts / misc files files, just drag and drop the script over to the components section and it will automatically create a component)


I have been playing around with Control Cursor State.
and now cursor is disabled but if I press pause while in inventory (i) I can use the save menu with quests info etc but atm my settings are so that it hides the cursor even while pressing pause but works in the inventory panels.
There must be a call cursor function invector is using that over rides the menu / pause that only allows the menu to work in the inventory panel? idk that's why I am asking
I have tried tick the enforce cursor during pause option but that does not seem to help either
Ideally I would probably like to somehow join the menu with the inventory items but I think I will have to dig about how to edit the invector inventory UI perhaps that is the solution.

Nb I am using / testing it with the demo menu and also the easy menu download add on
thanks, for any ideas or help,
are there any other cursor over rides I am missing?
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: save menu and invector inventory issues

Post by Tony Li »

Hi,

If you're talking about the DemoMenu script, it's not particularly comprehensive. It's really just designed to drive the Dialogue System's demo scenes.

If you're using the SaveSystemTestMenu script, you can assign the player's Inventory component to its OnShow() and OnHide() events. Set OnShow() to vInventory.enabled: unticked and OnHide() to vInventory.enabled: ticked. Also tick Pause While Open and Allow Cursor While Open.
glen
Posts: 13
Joined: Mon Nov 22, 2021 10:06 am

Re: save menu and invector inventory issues

Post by glen »

I am trying to use the dialogue system menu framework download
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: save menu and invector inventory issues

Post by Tony Li »

You can add a ShowCursorOnEnable script to the PausePanel.
glen
Posts: 13
Joined: Mon Nov 22, 2021 10:06 am

Re: save menu and invector inventory issues

Post by glen »

Axebaby in the invector forum offered this which helps a little:

Add these to Pause Game, Menu's or UI
to turn the cursor on or off

--Events
drag your Invector player controller into the Runtime box and to the right choose vshootermelleInput Showcursor then tick the box
drag your Invector player controller into the Runtime box and to the right choose vshootermelleInput Lockcursor then tick the box

Then on Exiting the menu, pause or UI Event ADD

--Events
drag your Invector player controller into the Runtime box and to the right choose vshootermelleInput Showcursor then Do Not tick the box
drag your Invector player controller into the Runtime box and to the right choose vshootermelleInput Lockcursor then Do Not tick the box


This settings I use with the Dialogue System Extras Framework in the Pause Event settings.
also There is a setting in Dialogue System to Not control the cursor "as I recall" turn that off I think and then add the Events I note above in the Pause Main Menu Framework and other menu's that require cursor on/off
It seems to work fine if you only use one scene (gameplay) but there is still an issue when coming from title screen or from a load. If only i could somehow add the menu into the invector inventory UI as the two seem to be conflicting. From what I read on other forums etc is that the menu system has not been updated to work with the latest invector updates etc? idk

I tried your code, cheers Toni, but it caused global settings warnings. thanks anyhow
I hate being new to things as it is always frustrating. Any other ideas are welcome as I got dialogue manager as it was supposed to have a functioning save system integration with invector. I feel as I am close to the solution as it is def a cursor over ride somewhere messing it up.
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: save menu and invector inventory issues

Post by Tony Li »

There's nothing specific to Invector in the Menu Framework. If the only issue is the cursor, did you add ShowCursorOnEnable to the PausePanel? I'm not sure what you mean by global settings warnings.

I put an Invector + Menu Framework example on the Dialogue System Extras page: direct download link.
Axbaby123
Posts: 6
Joined: Wed Oct 28, 2020 8:09 pm

Re: save menu and invector inventory issues

Post by Axbaby123 »

This is how I got it to work nicely, I did what Pixel Crushers recommended.. My old way "Invector cursor, lockcursor Events" works but this is cleaner and easier.

{Dialogue Manager} in the scene Hierarchy.( Input Device Manager Section ) === Turn OFF Control Cursor State

{MenuSystem} in the scene Hierarchy === Add the ShowCursorOnEnable script to your PausePanel

That fixes the cursor, wish I had that script last year.

Don't forget to add USE_INVECTOR_INVENTORY in the Unity Project Settings/Player/Script Compilation


Your Invector Player Character should have the following Dialogue System scripts
Invector Inventory Saver
Invector Stats Saver
Position Saver

Tested on Unity 2020.3.21f1 and latest Dialogue System and Invector released around 10 days ago, I don't have the latest release from a few days ago "can't download anything at my work site"

I Used the scenes from this Invector Package from Pixel Crushers and duplicated the Gameplay Scenes.
https://www.pixelcrushers.com/phpbb/vie ... ink#p28599
Added all scenes to the Build.

I modified the trigger to change scenes "door trigger" taken from Pixel Crushers Demo Scenes.
Player Tag
LoadLevel( ....)


Save works "I saved my scenes with new weapon and current position""
Load works "I changed scenes,I had the new weapon and saved position "

Loading screen worked
I didn't test Options

Good Luck
Last edited by Axbaby123 on Mon Nov 29, 2021 5:00 pm, edited 2 times in total.
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: save menu and invector inventory issues

Post by Tony Li »

Thank you very much for providing that write-up!
Post Reply