Scrolling Mouse Inventory Example (Similar to Half Life)

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi Guys,
    I just wanted to post an example of an inventory system that I came up with in about an hour, hopefully it can help other people if they're looking for something similar. I took inspiration from the half life series with their inventory switching system. The idea is that you use either the mouse scroll or the Q and E keys to choose your item in your inventory. When you do this, icons will appear on the screen showing which one you're selecting. The main icon will have 0 transparency while the other icons are set at 100 transparency. After a few seconds the HUD disappears.

    When you scroll the mouse wheel or use the Q and E keys, it changes the selected line in a list object. Each line in the list corresponds to a matching HUD icon. The # signs in the beginning/end of the list are to test when the user scrolls at the edges of the list. The list will scroll back to the first or last item in the list if the person reaches the limits of the list. The HUD icons are contained within a qualifier titled "Inventory" so it's super easy to add or remove inventory slots. If you want to add an inventory slot, clone one of the existing ones and edit the Alterable Value "Item Slot" number and Alterable String "Item Name". Then edit the list object and add the same corresponding number in the list.

    The item slot actives don't have to be in a row either, you can set them up in any shape. The second frame in the example shows the items in a circular pattern like in GTA V. I hope this helps someone :)


    Test out the example online with this .swf build here: Please login to see this link.

    Files

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

    Edited 13 times, last by Sumo: I keep updating the file/commenting it for easier understandability (August 6, 2015 at 8:59 PM).

  • Thanks for the response. Also thanks for moving the thread, I accidentally placed it in CF2.5 help.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

  • Sorry, I've been tweaking the mfa a few times and I keep re-uploading newer versions. It should be fine now.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

  • Looking back at my method of using an alterable string to store the item name, it might be easier to just write the name in the list object. Since the inventory compares the index number of the line in the list object, the actual text could be used this way to retrieve it.

    Custom A* Pathfinding in MMF2: Please login to see this link.
    Random Tile World Generation: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!