|
|
| Author | Topic: Question |
| I think Im Back |
So, if I remember correctly quest doesn't have any kind of math parser right? Like, I can't take 3 numeric variables(a,b,c) and add them together? I'm starting to get heavily into random dice rolls and stat numbers as I'm trying to develop some sort of combat/training system. So far I've just been planning things out in my head, figured I'd ask here before I started trying to code any of it. |
| Alex |
Quest's maths routines are fairly basic - they'll only accept two numbers as a parameter. So, if you want to add three numbers together A, B and C, you'll need to add A+B together and store it in another numeric variable (say, D), then add D+C. |
| I think Im Back |
But it will mulitply/divide/subtract/add any two numbers? |
| Computer Whizz |
I'm working on a maths parser : ) I'll probably have it so it can come out with lines which can be put into Quest so instead of thinking it all out you just put in a complicated equation and out pops 5 lines to put into Quest. Computer Whizz |
| Alex |
Yes you can add, subtract, multiply or divide two numbers or variables. If you're using QDK, instead of just entering one number in the parameter for "Set a numeric variable", you can use things like: %something% / 2 |
| Computer Whizz |
It even does stuff like "x to the power y".... All you need to do is put a sum into a loop to y! It can also work out factorials on that principal... Computer Whizz |