Staredit Network > Forums > SC2 Assistance > Topic: Using math in variables
Using math in variables
Dec 28 2010, 3:05 pm
By: Deev  

Dec 28 2010, 3:05 pm Deev Post #1



I had an advanced simluator program for starcraft II, and I used a lot of math equations to constantly update it, but at the time it was simple f(x)=n/x and I found that I could set/mod a variable to be amount divided with another amount, but how do I extend this if I want to do some further math on it?

- In the end I want to set/mod a variable with n/x+c so the mathmatic function I found wont work, since it only had place for 1 point, now I need to add a constant to it also? Of course I could calculate the variable first, then in another variable set that + the constant, but there must be a way to call multible math argumentations in a single line so I can set variable to "n divided x plus c" in same line-



None.

Dec 28 2010, 6:58 pm Roy Post #2

An artist's depiction of an Extended Unit Death

Under the Math section there is a function called Arithmetic, which would be what you want. There's also Arithmetic Multiple, but I don't really see it being faster or more useful.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
[2026-4-13. : 10:07 pm]
NudeRaider -- ya why phone people when you can just write letters
[2026-4-13. : 9:37 pm]
IskatuMesk -- I have never and will never own a phone
[2026-4-13. : 9:15 pm]
NudeRaider -- Vrael ranting still is though
Please log in to shout.


Members Online: Zycorax, coleowen466, jarofixkaufen