setDrawingEraser: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setDrawingEraser |version=1.4.1.9 |trusted=true |description= Returns a value corresponding to the eraser setting of the drawing. A normal visible drawin...")
 
No edit summary
Line 15: Line 15:
|examples=
|examples=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",0)]
[r:setDrawingEraser("Grasslands", "0000000094218C675800000000000000",0)]
[r:refreshDrawing("Grasslands", "0000000094218C675800000000000000")]
[r:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)]
[r:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)]
[r:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")]
</source>
</source>
|also=
|also=
{{func|getDrawingEraser}}
{{func|getDrawingEraser}} {{func|refreshDrawing}}
}}
}}
[[Category:Draw Function]]
[[Category:Draw Function]]

Revision as of 20:48, 5 February 2018

setDrawingEraser() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.4.1.9
Returns a value corresponding to the eraser setting of the drawing. A normal visible drawing will return false(0), while a drawing that cuts the drawing below it will return true(1).

Usage

setDrawingEraser(mapName, drawingId, paint)

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.
  • boolean - The value of the setting to set, true(1) or false(0).

Examples

[r:setDrawingEraser("Grasslands", "0000000094218C675800000000000000",0)]
[r:refreshDrawing("Grasslands", "0000000094218C675800000000000000")]
[r:setDrawingEraser("Grasslands", "00000000CCF6B567CC00000000000000",1)]
[r:refreshDrawing("Grasslands", "00000000CCF6B567CC00000000000000")]

See Also