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.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Wing Zero, IlyaSnopchenko, jun3hong