User Tag List

Results 1 to 6 of 6

Thread: Listbox question: Checking to see if an exact string is in the box more than once?

  1. #1
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Listbox question: Checking to see if an exact string is in the box more than once?

    Hello guys

    So I'm trying to make a way to beee potions in my game, with conditions that check to see if you have the ingredients in your backpack. I'm using FindstringExact for the inventory listbox and it works great.. UNTIL I want to have a potion that requires more than one of the same ingredient (ex nutmeg + nutmeg). I tried using two Findstrinngexacts with different flags to them but it didn't seem to register both items, only one.

    What I mean is I have only 1 nutmeg in my pack but it's letting me brew the potion that should take two of them to do.

    I know I could do this using multiple lines but I really wanted to be able to do this on a single one if possible.

    Any tips?

  2. #2
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I can't edit my post but it should be BREW potions, not BEEE potions hahaah

  3. #3
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2015
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried setting up a condition for that recipe that requires > 1 nutmeg?

  4. #4
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wererabbit View Post
    Have you tried setting up a condition for that recipe that requires > 1 nutmeg?
    I'm not sure how to do that with what I have.

    I just want the one line and right now it has:


    FindStringExact(listbox, "nutmeg", 0) <> -1
    +FindStringExact(listbox, "nutmeg", 0) <> -1

    -> (make the potion)

    But the thing is this will create the potion if I only have 1 nutmeg in my pack.
    If there's a way to see how many stances of an exact string exist in a listbox (in a single conditional event) though please tell me, that'd be awesome!

  5. #5
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    971
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    I'm not sure how to do that with what I have.

    I just want the one line and right now it has:


    FindStringExact(listbox, "nutmeg", 0) <> -1
    +FindStringExact(listbox, "nutmeg", 0) <> -1

    -> (make the potion)

    But the thing is this will create the potion if I only have 1 nutmeg in my pack.
    If there's a way to see how many stances of an exact string exist in a listbox (in a single conditional event) though please tell me, that'd be awesome!

    Ok I was able to do this by running a fastloop at the top of the events and tallying the nutmeg lines of the listbox into a global variable. So I'm just checking if nutmeg >= 2 and it worked.

  6. #6
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Sep 2015
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting! That is a good solution. My thoughts were along the lines of the user taking an action to select a recipe, and then attach conditionals based on that recipe.

Similar Threads

  1. BUG of List obj's Find String Exact?
    By callofAS in forum Fusion 2.5
    Replies: 2
    Last Post: 4th June 2020, 10:31 AM
  2. Retrieve counter string - gives exact value but not value shown.
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th February 2014, 06:50 PM
  3. Find String Exact List help
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 30th May 2013, 09:51 PM
  4. Find String exact
    By dascribe in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th May 2010, 09:43 PM
  5. Changings in Listbox/String in Build 243?
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 17th January 2007, 11:21 AM

Posting Permissions

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