Exponents?

Discussion in 'Javascript/Plugin Support' started by Nohmaan, Oct 24, 2015.

  1. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    First Language:
    English
    Most of my damage formulas use exponents, but I'm not familiar with the syntax for JavaScript to do so?

    So, for example, how would I make a skill that does a.atk**0.75 ?
     
    #1
  2. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    4,454
    Likes Received:
    3,723
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I would at least try the carat (^) which is the mathematical operator for exponents ( 5 ^ 3 = 125 ), but if that doesn't work, it looks like you can probably use the .pow JS method.
     
    #2
  3. Nohmaan

    Nohmaan Veteran Veteran

    Messages:
    138
    Likes Received:
    33
    Location:
    Minneapolis MN
    First Language:
    English
    Yeah, I had to do the Math.pow(x, y) to get it.  Wasn't sure if the a.atk would work inside of that but it works fine.  Both ^ and ** do nothing in formulas it seems.
     
    #3
  4. Tsukihime

    Tsukihime Veteran Veteran

    Messages:
    8,230
    Likes Received:
    3,067
    Location:
    Toronto
    First Language:
    English
    Damage formulas silently swallow errors, which is probably why they do nothing.
     
    Last edited by a moderator: Oct 24, 2015
    #4

Share This Page