Greetings,

I have a question when it comes to the formulas..

How can I in a easy fashion have a formula to recalculate a random number a certain number of times and adding them depending on the lvl of my player?

For example I have a warlock that has a spell that I want to do lets say 1-10 damage per class level of the player.

So basically what I do normally is to:

Create a Check Status Value to determine the class level of the player. And lets say if he is between lvl 1-3 then it is a success which leads to a value node with random 1 to 10. The failure node goes to a new check status value that checks if the players class level is between 4-6 then it leads to a success connection where another value node that adds random 1 to 10 and then leads to another value node that adds another random 1 to 10. So in this case if the players class level is 1 then he does 1-10 damage and if his class level is 2 then he does 1-10 + 1-10 damage.

In this example the formula is simple and also only 2 different damages. In my formulas the damage calc is much more advanced and I have like 10 upgrades to that damage. That would cause me to make really big formulas. What I would like to find out is if I in someway can do something so it takes the value node with a random 1-10 and then adds a new 1-10 damage and continues like this based on how many class lvls the player has. This is important since I do not want the formula to take 1-10 and then multiply that with the class level since that would be completely different since ie it would take the random number which lets say was 8 and then multiply that with 2 (if lvl was 2) and that would end up at 16. That's not how I want it since I want him to roll first random which was 8 and then make a NEW random 1-10 which lets say was 4 for a total of 12.

So to get this atm I then do alof of check status value to see the level and then create the damage by repeating the add random 1-10 value nodes. There should be a much more efficient way I believe?
  • Your example of (1~10)*level would in the end be level~level*10, i.e. you could store the level and the level*10 in 2 variables and use them for your random value.

    To store the levels in variables, you'd need make 2 formulas (one just using the user's level, one using the user's leve and multiply it by 10) and use them before your damage calculation (usually before the Calculate step of your battle event) to store the values into variables.
    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!
  • Thanks a ton for the input! :)
Sign In or Register to comment.