Maths trouble..

nightleafnightleaf Member Posts: 28
edited November -1 in Working with GS (Mac)
I'm trying to do the following equation in Gamesalad:

=(-0.002815*( game.level ^3))+(0.115( game.level ^2))-(1.958* game.level )+20.97

Is this doable or not? Because the attribute I'm constraining this to has a Display Text behaviour that should be causing it to display the result of this equation, but it shows nothing.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi nightleaf (nice name!): That's doable (as long as game.level = an integer or real number, as I'm sure they do), and then I guess the result goes into another new attribute, called result for instance?

    Then putting the amount in result into the text editor doesn't work via the expression editor: I get game.result as words for the text, not on a blue button type thing which would give you the contents as you want. I'd hazard a guess this is an oversight by Gendai; though I'm prepared to be corrected!

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • nightleafnightleaf Member Posts: 28
    Ah i see.. Well as long as it works within the game I'm happy. I was just using display text to check the equation worked correctly really... I'll try again with a timer or something to check the result out. Thanks for your help!
Sign In or Register to comment.