edited June 2020 in ORK Support
I'm using a simple formula for calculate physical damage (In the Tutorial). So this is the formula (user ATK ^ 2) / target DEF * Level Factor In this if user has lots of damage than the targets defense, user can do so much damage.
Ex: (250 ^ 2) / 50 * 1 = 1250
So I wanna clamp the output damage in between (min - 0, max - user's ATK Status)
How can I achieve this?
Post edited by Malith on
  • You can limit the formula value either via the Formula Settings minimum/maximum settings or a Limit Value node, though both only allow using defined values.

    For anything else, you can use a Check Formula Value node to check the current value and change it afterwards. E.g. for the user's ATK, create another formula that just sets the value to the ATK of the user and use it to check and set the value of your damage formula.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you :)
  • Just a small heads up, next update will change min/max values to the usual value selections, i.e. you can also use formulas for it :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That's nice. Now I' using formulas It's very flexible. Thanks for the tip :)
Sign In or Register to comment.