User Tag List

Results 1 to 6 of 6

Thread: How to tackle inventory items?

  1. #1
    Clicker Fusion 2.5

    Join Date
    May 2015
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to tackle inventory items?

    I thought I had the perfect solution for an inventory interface but things haven't gone as expected.

    I have 14 identical looking active objects which span across my screen (they are empty boxes) - these are the slots for my inventory's interface. I have a loop which counts the number of items in the inventory and works out how many pages it needs and populates them accurately with item descriptions which are inherited from a save file in the build directory.

    For the icons, I created an active object called Inventory and I have made dozens of icons showing different items in which each item is displayed in a frame of animation. (Eg: Frame 1 is empty (no item in slot), Frame 2 is item 1, Frame 3 is item 2 etc...). In the loop, I create an icon for each slot and assign the item ID + 1 to the animation frame of that object... HOWEVER, every single icon is stuck on frame 1.

    Is this because all instances of an object will display the same frame once one item is changed? I ran a condition which says "If icon overlaps Slot 1 then change to frame 2) etc... but none of them are showing anything other than frame 1.

    Is there a way to solve this??

    I really thought this would work because if you create 20 enemies from the same object and a bullet collides with it and you say "destroy", only that enemy is destroyed and not all of them, why can't I call an animation frame using the same principal? I know the collision with the slot is being detected because I logged an event in a list box every time it happened, yet the animation frame isn't changing, or they all change at once, I'm not sure which.

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jun 2015
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The condition by itself (icon is overlapping slot>force animation frame of icon to 1) works as intended for me, so there must be something else going on that's changing the frame of all the duplicates of the icon object, most likely an event that doesn't reference the icon object in its conditions.

    Can you post your .mfa so we can see what the other events are?

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2015
    Location
    Central Oregon, USA
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you set the animation speed of the icons to 0? That often throws me for a loop for a minute when my frames aren't loading.

    Not sure why all of them are showing the same thing though.

  4. #4
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,680
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    There is a windows only inventory object btw :

  5. #5
    Clicker Fusion 2.5

    Join Date
    Jun 2015
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    According to the most recent posts in the Inventory object's thread, it hasn't been updated to 2.5 yet.

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,297
    Mentioned
    27 Post(s)
    Tagged
    0 Thread(s)
    Since you are using ID+1, I assume you are setting the ID variable to something? Might seem silly, but you probably aren't setting it to anything and it is using a default value of 0. Just change the default to another value (for instance, 4) and see if all of the inventory icons are using frame 4. If this is the problem, make sure you set the ID to the proper value.

    EDIT: Out of curiosity, are your slot active objects all unique? Or are they instances of a single slot object? If they are unique, your overlap condition should work. If they are instances, then you need to run a loop to check which icon overlaps which slot. I generally just set the image on the loop I used to create the inventory, so I'm not running constant overlap checks.

Similar Threads

  1. Import library items as unique items?
    By Alpha17x in forum Fusion 2.5
    Replies: 0
    Last Post: 23rd January 2015, 05:54 AM
  2. Add items every so often
    By AnonymouseK in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 25th August 2013, 07:38 PM
  3. Equipping items Inventory Help
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 14th January 2010, 03:15 PM
  4. Scrolling inventory slots for infinite items
    By Blizna in forum File Archive
    Replies: 0
    Last Post: 12th June 2009, 01:49 PM
  5. Adventure game inventory items
    By DEKE15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th April 2009, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •