misc_func
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| misc_func [2022/07/15 15:08] – [Pets] admin | misc_func [2025/02/25 22:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 843: | Line 843: | ||
| ===== Maps ===== | ===== Maps ===== | ||
| {|style=" | {|style=" | ||
| - | |style=" | + | |style=" |
| |- style=" | |- style=" | ||
| |**Syntax** | |**Syntax** | ||
| - | |style=" | + | |style=" |
| |- | |- | ||
| |colspan=" | |colspan=" | ||
| |- | |- | ||
| - | |colspan=" | + | |colspan=" |
| - | use in your code like: | + | |
| < | < | ||
| # | # | ||
| - | d = Misc.Distance(10, 10, 20, 20) | + | mapInfo |
| + | print(" | ||
| + | .format(mapInfo.MapOrigin.X+mapInfo.PinPosition.X, | ||
| + | mapInfo.MapOrigin.X, | ||
| # | # | ||
| </ | </ | ||
| + | |||
| + | |- style=" | ||
| + | |**Note:** | ||
| + | |The pin position is an offset from the origin, so you have to add them to get absolute location | ||
| + | |||
| |- style=" | |- style=" | ||
| |**Returns** | |**Returns** | ||
| - | |int | + | |MapInfo{ PinPosition, |
| |- | |- | ||
| |**In Object:** | |**In Object:** | ||
| Line 865: | Line 872: | ||
| |- style=" | |- style=" | ||
| |**Parameters: | |**Parameters: | ||
| - | |X1 - x origin | + | |serial |
| - | |Y1 - y origin | + | |
| - | |X2 - x dest | + | |
| - | |Y2 - y dest | + | |
| |} | |} | ||
misc_func.1657897729.txt.gz · Last modified: 2022/09/03 22:41 (external edit)