User Tag List

Results 1 to 6 of 6

Thread: Getting string to read expressions from array

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting string to read expressions from array

    Hi, I'm working on a project, and want to load string expressions from an array to a string object. But the string just shows the litteral expression, instead of executing it.

    For example if i say: Set StringA to (Array 1,1,1). And the array says: Alterable String A("player"). Then StringA displays: Alterable String A("player"), instead of the string of player.

    So my question is, if there's any way to make it execute the expression, when the string comes from an array or paragraph, or do expressions only work when you make them directly in the event editor?

    Thanks in advance

  2. #2
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind. Found a solution myself.

  3. #3
    Forum Moderator

    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,755
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Would you share the solution with the rest of the forum?

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

  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Attachment 26318Reading alterable strings from an array.mfa

    Sure. Here it is. Hope it can help somebody.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    644
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Crashes when I hit the button.

    Why do you not just store the Player_Name string as one string to the array, then add that to the Alterable String?

    Make sure the array isn't Base 1, and then it should look like this:

    Start of Frame > Write String "Player_Name" to Array(0,0) and Set Alterable String toStrAtXY( "Array", 0, 0 ) + " likes ice cream"

    No extra extensions needed.

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2017
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well thats not the thing i wanted to do. I wanted to have an array full of lines of dialogue. And when they mention the player in the dialogue, it writes the players own custom name. This makes it easy to create a lot of dialogue for a game.


    And do you have the extension installed? That might be why it crashes.

Similar Threads

  1. Expressions and String Comparisons?
    By Kid_Roleplay in forum Fusion 2.5
    Replies: 9
    Last Post: 3rd November 2016, 12:21 AM
  2. Replies: 0
    Last Post: 11th June 2016, 09:19 AM
  3. Android File Read to array problems
    By mnf_northern in forum Fusion 2.5
    Replies: 5
    Last Post: 18th July 2015, 08:06 AM
  4. String with accent not read from array
    By smart_fr in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 3rd May 2012, 11:50 AM
  5. Need help understanding how to read an array
    By TripletDad in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st April 2008, 06:54 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
  •