User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: how do you check is specific item exists in list

  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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    how do you check is specific item exists in list

    I am using a list item for my inventory and in this case I want to check if for example the player already has "sword" available in the list.
    Is it possible to scan the LIST item for a specific item and if it exists, not to add any more of it's type?

    Or if it exists, use it as a condition to have it appear in the inventory.

    Thanks in advance.
    Sorry if its a stupid question

    If its the "find string" command, what should I put in the <flag> value?
    I wonder what the flag determines?

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zetcom's Avatar
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it is possible. I think the easiest way to do this is to use Internal List Object extension. It has: "Item .sword. is in List" condition. You can even use List Object but it's less pro

    If its the "find string" command, what should I put in the <flag> value?
    0 or 1

  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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    is there a way to count how many swords I have in the list? If so how? What is the command.

    What does the flag do? I know it should either be 0 or 1

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export Module
    ximo's Avatar
    Join Date
    Jul 2013
    Location
    Spain
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this is what you are looking


    find string.mfa

  5. #5
    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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, thank you for the example. But the "number of strings" counter in it is not hooked to any logic and does nothing. Can you complete the example so it can count how many coats are there in the list?

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export Module
    ximo's Avatar
    Join Date
    Jul 2013
    Location
    Spain
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...I forgot to put


    find string.mfa

  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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Your example lists the total number of lines in the list. That is easy- I already know about that

    Is it possible to list the number of lines with a specific name. For example if you put the line "Coat" twice in the list, make fusion return a value of 2, when I type coat in the edit box.
    Is that doable?

  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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Its like this- I have an inventory system set up with each specific item corresponding to an indexNumber value.
    When I press left- it adds to the activeItem value, when right- subtracts.

    Now I am trying to add logic to check if the string (name) of the active item is available in the list and if not - to skip it.

    I am not sure if this is a good way to do this- but effectively I want to display all of the current list objects with an active object. Control which list item I am on through the active object- as it looks nicer as a graphic

  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
    493
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    So the hud is a square shaped active item showing the currently equiped weapon. pressing left and right switches to the previous/next item. It is currently going through all the weapons in the game.
    Now I need to somehow hook it up with the list file and make it skip or not show any items that are not available in the list file - so non acquired weapons can not be installed.

    I think I am not approaching this the right way atm. But I cant use the actual list file to swicth between items, because its input controls are hardcoded and not suited for my game's design at all

  10. #10
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,729
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Would my open source "Gizmo" example help? It uses a list object to switch items. On my website.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Page 1 of 2 1 2 LastLast

Similar Threads

  1. list item - specific input controls
    By blurymind in forum Fusion 2.5
    Replies: 8
    Last Post: 7th December 2014, 12:12 AM
  2. How to reliably check if INI exists?
    By NashMuhandes in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 16th December 2013, 06:46 PM
  3. Check if picture exists on SD?
    By StingRay in forum Android Export Module Version 2.0
    Replies: 3
    Last Post: 2nd December 2013, 02:06 PM
  4. Check if a file exists (IOS)
    By Tuna in forum iOS Export Module Version 2.0
    Replies: 11
    Last Post: 14th March 2012, 07:02 PM
  5. Next item on the check list.....
    By ZayLong in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 31st August 2008, 05:29 PM

Tags for this Thread

Posting Permissions

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