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:42 am]
RIVE -- Hellooooo, Nurse
[04:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
[2026-5-31. : 6:47 pm]
Symmetry -- I did my first EUD thing today. Feels like me finding arsenal at age 8 again
[2026-5-31. : 3:20 pm]
l)ark_ssj9kevin -- le reddit
Please log in to shout.


Members Online: NudeRaider, Excalibur, jun3hong