[Solved] Distance between points condition

Status
Not open for further replies.
Level 2
Joined
Jul 10, 2019
Messages
14
People seem to easily find the distance between point condition. I can't. What are you supposed to click on exactly? The only thing I know is that it's an integer comparison.
 
Be careful to clean up any point (location) values it is passed. Such conditions are a common cause of location leaks.
Interesting. I thought you only get location leaks from regions or variables that set said unit position. Will keep that in mind.
 
All points leak. Basically anytime you make a trigger action and there is a point where you have to replace the default value of (Center of (Playable Map Area)) or (Position of (Triggering Unit)) or whatever, that is always a point, which should be cleaned.

Here you can see how you can check which kind of information the argument wants:

tempsnip.png


And if you look closely, you'll notice that it actually leaks two points, because the distance is measured between two different points. So you need to set two variables, TempPointA and TempPointB, and after that you can make the condition check in an if-then-else statement.
 
Status
Not open for further replies.
Back
Top