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.
[03:35 pm]
Symmetry -- though mine's probably worse
[03:35 pm]
Symmetry -- That certainly sounds similar to what I've made
[06:28 am]
Ultraviolet -- sounds like Bound & Defend
[07:43 pm]
Symmetry -- If you take the reins you damn well be ready to ride
[2026-5-23. : 2:46 pm]
NudeRaider -- you wish
[2026-5-23. : 12:43 am]
IskatuMesk -- Ah, so Reindeer Breeding 3: BDSM edition.
[2026-5-22. : 12:45 am]
Moose -- tbh
[2026-5-20. : 8:27 pm]
Symmetry -- It's a bound map where you cross obstacles to earn units to defend your base
[2026-5-20. : 8:16 pm]
Symmetry -- No, the world isn't ready for that
[2026-5-20. : 5:11 pm]
Zoan -- Reindeer Breeding 3?
Please log in to shout.


Members Online: lil-Inferno