Location Data Type Composition
As with other (link) Data Types the location data type is a composite of itself and a number component you can test this your self by manual assigning an input a location value under the world tab and using the number slider or input box at the bottom to set a number value after clicking the check box to enter the data if you hover over the input box you just modified you will see a col um of number 3 high like below.
1 |
6 |
9 |
This would be the x, y and number parts of the data type. However in most cases the number component will not do anything useful if you are trying to work with a location.
Relative Location Meaning on the World
As a X location value increases in value the location moves to the right by one grid unit. Decreases move the location to the left.
As a Y location value increases in value the location moves down by one grid unit. Decreases move the location Up.
Location Math
To do math on location data and get usable location results both inputs need to be location data. Add and Subtract work as you would think but only applying the math function from X to X and Y to Y
Locations as a X, Y Plane
All the Locations possible on the world map combine to the equivalent to a X,Y plane in math with certain locations equivalent to the origin and X and Y axes on a plane.
Red: The Origin
Green & Red: The X axis
Yellow & Red: The Y axis
Special Property: Reflection
The most useful aspect of math on locations is multiplication and division in that it allows you to manipulate x,y values in relation to the 0,0 lcoation on the x,y plane.
If you were at some location and wanted to go the opposite direction by the same amount from the location 0,0 you can use the Instruction
if you were only using multiplication this would have very limited use as it would always be relative to the location 0,0