Staredit Network > Forums > SC2 Assistance > Topic: Simple Subtraction
Simple Subtraction
Apr 25 2010, 10:25 pm
By: Morphling  

Apr 25 2010, 10:25 pm Morphling Post #1



I'm trying to subtract the mouse position with the heroes position, but I cannot figure out how.
I created two variables that stores the Mouse X and Mouse Y position and another that stores the point for the position of unit, but I cannot subtract an integer from a point so how can I do it?



None.

Apr 25 2010, 10:37 pm Centreri Post #2

Relatively ancient and inactive

Try finding an arithmetic function. The editor isn't loading for me right now, but that's what it was in WCIII.



None.

Apr 25 2010, 10:54 pm Morphling Post #3



You cannot do any arithmetic with points. Is there any way to seperate values of a point into two seperate variable integers?



None.

Apr 25 2010, 11:09 pm Centreri Post #4

Relatively ancient and inactive

You can do arithmetic between the x and y values of points. Create four local variables: x and y of both points, basically. Then subtract them and make a point out of that. I don't want to go all through it, but I've seen the functions that work with x and y.



None.

Apr 25 2010, 11:38 pm DavidJCobb Post #5



Quote from Morphling
You cannot do any arithmetic with points. Is there any way to seperate values of a point into two seperate variable integers?
He doesn't know how to get the x and y coordinates into their own variables, Cent.



None.

Apr 25 2010, 11:39 pm Morphling Post #6



I cannot find out how to put the x and y of unit position into integers. The option to find the position is only available when the variable is a point and I cannot figure out how to subract a two integers(mousex and mousey) from one point(unitx and unity).



None.

Apr 26 2010, 12:07 am Morphling Post #7



Nevermind I figured it out.



None.

Apr 26 2010, 1:31 am Centreri Post #8

Relatively ancient and inactive

Yeah, all it takes is using the search function. <_<



None.

Apr 26 2010, 1:38 am Morphling Post #9



The problem was that I was using an integer when I should have been using real.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
Please log in to shout.


Members Online: Ultraviolet, jun3hong