Forum rules - please read before posting.

Inventory items adds to end, but offscreen

I have my inventory items set to add to the end, the inventory opens, hilights the latest item with a pulse and a sound, then closes the inventory again, I have never until now had so many items that they fill up the entire inventory menu so that I need to use the scroll arrows, so I never noticed before, but items now add to the end but offscreen to the right and I hear them hilight but can't see it. I would have thought it would automatically scroll to show the last item added and then hilight, So I think I must be doing something wrong in the set up of the inventory menu maybe? Hope that makes sense and that someone can help, thanks in advance!

Comments

  • edited August 4

    Can you share screenshots to illustrate the issue? Share shots of the issue as it occurs in the game, as well as the Menus / ActionLists involved.

    I'll also need details on how you're handling the "highlight last item" feature.

  • edited August 4

    Hi Chris, thanks for the reply, here are the shots of the inventory menu, how I add the item, and the screenshot in game. In the shot, I just picked up a rock, I hear it add to the inventory but as it is at the end off to the right I can't see it add, then if I go up to the inventory and use the arrow to scroll right when the rock comes into view it then hilights! I would like to continue adding picked up items to the end though as the journal and map should always be first. I'm not sure what the 'hilight last item' feature is, so that's probably my problem! :D (AC version is v1.60.4)
    https://ibb.co/Ngj5BQ8p
    https://ibb.co/4RwcNd5N
    https://ibb.co/TDb3xMVC

  • (AC version is v1.60.4)

    Egads, that's 8 years old!

    To shift to the end, you'd need to run the following code line:

    AC.PlayerMenus.GetElementWithName ("Inventory", "InventoryBox").Shift(AC.AC_ShiftInventory.ShiftNext, 100);
    

    Create a new C# script named FullyShiftInventory.cs and copy/paste:

    using UnityEngine;
    public class FullyShiftInventory : MonoBehaviour
    {
        public void Shift()
        {
            AC.PlayerMenus.GetElementWithName("Inventory", "InventoryBox").Shift(AC.AC_ShiftInventory.ShiftNext, 100);
        }
    }
    

    Add to an Empty GameObject, make it a prefab, and then use the Object: Call event Action to run the prefab's Shift function, just after the Menu: Change state Action that turns the Menu on.

  • Perfect! That works great, thank you Chris! Ha, yeah 8 years old, I'm far too scared to update now! :D

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.