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.
[2026-4-26. : 1:58 pm]
lil-Inferno -- ya
[2026-4-25. : 11:50 pm]
JamaL -- Glad to see SEN will never die. Kudos to whoever is paying the hosting fees these days!
[2026-4-25. : 3:37 pm]
NudeRaider -- (-.-,)
[2026-4-25. : 3:35 pm]
Zoan -- ;o I thought that was a monkey emote
[2026-4-25. : 3:34 pm]
Zoan -- :mods:
[2026-4-25. : 3:34 pm]
Zoan -- :mods"
[2026-4-25. : 3:20 pm]
NudeRaider -- Vrael
Vrael shouted: moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
boy, if you're not careful I'll moderate your sorry ass too!
[2026-4-25. : 3:06 pm]
RIVE -- Yyyes. Don't you see it?
[2026-4-25. : 2:11 pm]
Vrael -- moderation? on SEN? in 2026? completely localized in anoeth47's topic? at this time of year?
[2026-4-25. : 1:39 pm]
NudeRaider -- anoeth47
anoeth47 shouted: Can I get a moderator/lord of the forum to clean up my topics - delete posts not really part of the topic.
send me the links of the posts you want deleted via pm
Please log in to shout.


Members Online: curvedscrutiny1, Zergy