movedOverDrawing: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=movedOverDrawing |version=1.5.2 |trusted=true |description= Use to check if a given path has crossed through a specified drawing. Returns a JSON array w...") |
No edit summary |
||
Line 23: | Line 23: | ||
|also= | |also= | ||
{{func| | {{func|getDrawingInfo}} | ||
}} | }} | ||
[[Category:Draw Function]] | [[Category:Draw Function]] |
Revision as of 11:28, 11 April 2019
movedOverDrawing() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.5.2
Use to check if a given path has crossed through a specified drawing.
Returns a JSON array with coordinates of all cells in the path that overlap with the area defined by the given points.
Usage
getDrawingInfo(mapName, drawingId)
Parameters
mapName
- A string containing the name of the map.drawingId
- A string containing the id of the drawing. The easiest way to discover a drawing's Id is via the Draw Explorer interface.path
- JSON array of X/Y coordinate such as that returned by getLastPath()
Examples
[h: lp = getLastPath()]
[h: id = findDrawings(getCurrentMapName(),"fig1")]
[r: movedOverDrawing(getCurrentMapName(),id,lp)]