User Tag List

Results 1 to 9 of 9

Thread: item list - show number of items per entry

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    item list - show number of items per entry

    So I am using a list file to store my items. The problem is that items get listed more than once
    -potion
    -potion
    -potion

    and what I want is for an item to get listed once and appended to it to have the number of items of its type

    -potion x 3

    is this possible to do with two list files? (one for the storing of them and another for the visual representation)

    How? Is there an example somewhere out there?
    I am not sure of the syntax to do this. I am guessing that I need to use a fastloop somehow to go through the storage list item

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    just use the list for keeping track of your items, and then loop through it to check how many of a certain item there is and display that amount using a string: https://www.dropbox.com/s/7mpawvwjfx...0list.mfa?dl=0

    I made it so that you can use it for finding whatever you want, just refrain from including lines like "potion 2" in the list since a limitation of the find$ function is that it doesn't pay any heed to whether or not what you're searching for is part of another word/sentence. You can get around this using some more loop trickery if you really wanted, although it might be a bit hard to grasp: http://community.clickteam.com/threads/90110-search-for-string-in-string?p=649846&highlight=#post649846

    EDIT: If your intention was to use another list object for visual representation, take the amount my example gives you and then just add a line to your visual list in the same way I display the amount with another string

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    casleziro> Once again you have solved another stumbling rock for me. Thank you so much

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    btw I have to run a loop to check the number of each individual item type I have , right?

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    679
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Every time you want to search for a new item type you mean? Yes. Just make sure you set the string before running the find loop or it won't return anything.

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    can you help me do this with two list objects instead of a list and a counter. it doesnt work for some reason.

    more precisely - how do you update the item count when its not on start of frame (update with a fast loop) ?

    When I update - it adds more to the value when it shouldnt.
    Or it doesnt update the value at all.

    I must be doing something wrong when checking if the value is correct before trying to update it. Perhaps the way I am checking is wrong - perhaps its the timing. I'm not sure

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I am way over my head with this. How the hell do you do it if its not on start of frame?

    It keeps adding more and more on each update when i try to do it with a loop

  8. #8
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Edit- Ok I got it to work finally.

    After much overcomplication, I came to the conclusion to simply separate where I store the number of items and where I store the count for each loop. This took care of most issues.

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    blurymind's Avatar
    Join Date
    Feb 2014
    Location
    Huddersfield, United Kingdom
    Posts
    497
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Update to the situation - Now I got stuck on the problem of deleting a line from the storage item list when selecting and using it in the the HUD item list !
    I can extract the string of the name

    Now the question is how do I find an item in a list by name and delete it one time?

Similar Threads

  1. treeview. number of items in a folder?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th May 2009, 02:31 PM
  2. Making items & item slots for RPG, please help.
    By Iwantmyrpg in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 28th August 2008, 08:36 AM
  3. bug: List object doesnt show list of files ...
    By Rushino in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st November 2006, 11:46 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
  •