User Tag List

Results 1 to 2 of 2

Thread: Converting string to math operator...

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Feb 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Converting string to math operator...

    Hello all. I'm looking for a solution that I doubt exists, but I figured I'd ask anyway. I'm wondering if it's possible to convert a string such as "+" to an operator. I'm working on a math game where the values and operators of an equation change often, and the player has to balance the equations.

    For example, an equation might be ValueA+ValueB*ValueC=ValueD-ValueE. The player can tinker with the values and they must make the equation true. The changing values works just fine, but changing operators based on variables/strings does not seem possible.

  2. #2
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    667
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    You might try using the "ExpEval Object", it evaluates strings as complex expressions.
    Or use xLua to return an expression's result to you.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/R3WuvF3mHr

Similar Threads

  1. converting this string...
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd January 2013, 02:32 PM
  2. Converting a Parameter to a String
    By Jaffob in forum Extension Development
    Replies: 2
    Last Post: 26th October 2008, 02:55 PM
  3. Converting string to URL
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 4th October 2008, 11:28 PM
  4. Or Operator
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 19th November 2007, 12:08 AM
  5. Converting part of a string to negative number
    By Simion32 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th April 2007, 12:44 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
  •