User Tag List

Results 1 to 6 of 6

Thread: How do you pull from an ini using a list?

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you pull from an ini using a list?

    Hello guys. I don't post here but usually just roam about from time to time for help tips, and for the majority of my first game creation experience, it's been a swell one.

    I'm running into an issue with my current design implementation for my game.

    To make a long story short, I've created a list based off an ini file, and have the contents of which highlightable by the up and down arrow keys.

    Is there any way when the user has one of the elements highlighted and hits a key to use that specific item, for me to set the current item of the ini equal to the current selection of the list?

    Currently when I try, my list is populated with items as follows:

    ItemA=5
    ItemB=3
    ItemC=11

    etc...

    But when the user, in this example, highlights selection ItemC=11 and hits the use key, it is setting the current item to "ItemC=11" which ... is not what is wanted. What is wanted, is to set the current item to "ItemC". Is there a way to do this? without the =11 part attached?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You can use string parser or tokenizer extensions to break up the strings by using "=" as the delimiter... which means "ItemC=11" would return:

    ItemC
    11

    As two different tokens.

  3. #3
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick reply.

    Is there another way around this without extensions?

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since I first wrote this, I tried to write the string into an array value at its first position. I then tried to make an equivalency test of:

    Condition: Array position 1's string value == Current list selections string value
    --Do this---

    But it doesn't seem to be working

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleInstall Creator Pro

    Join Date
    Dec 2010
    Location
    United Kingdom
    Posts
    961
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you absolutely don't want to use extensions, you could use the Left$ command in your expression to pull the first 5 characters from the "left" part of the string:

    For example:
    If you had "ItemA=5" as the currently selected line.
    Left$( List Select$( "List" ), 5 )
    Would retrieve the first 5 characters of the string "ItemA"

    Edit: I had to edit this a few times, I completely misread the question at first

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no worries. i wanted to respond with a thank you to konidas. i now have item management set up upon using an item out of a list with only 2 conditional statements:

    one being the "upon pressing a key"
    and the other being Element$("tokenizer", 0) = "Fish"

    cheers and thank you

Similar Threads

  1. Pull Playercharcter up a Ledge with a nifty Animation
    By Gogeta in forum Multimedia Fusion 2 - Technical Support
    Replies: 26
    Last Post: 1st February 2014, 04:14 AM
  2. Please help me, or I might pull out all my hair!
    By StardustSpeedman in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th October 2012, 11:58 AM
  3. How to pull off a transition like Link's awakening?
    By FragmentedBergyo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th October 2012, 12:02 AM
  4. iOS 5 Pull Down Notifications interference
    By Keith in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 22nd October 2011, 09:57 PM
  5. How can I use the Regular Expression to pull data?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 24th November 2010, 05:00 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
  •