eraseMBL: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=eraseMBL |proposed=false |trusted=true |version=1.9.0 |description= Erases Movement Blocking Layer (MBL) shapes from the '''Map''' MBL. This function do...")
 
m (Conversion script moved page eraseMBL to EraseMBL without leaving a redirect: Converting page title to first-letter uppercase)
(No difference)

Revision as of 22:37, 9 February 2023

eraseMBL() Function

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

Introduced in version 1.9.0
Erases Movement Blocking Layer (MBL) shapes from the Map MBL. This function does not affect Token MBL.

This function works the same as drawMBL() with the difference that drawMBL() draws the shapes on the Movement Blocking Layer and eraseMBL() erases them. For more examples go to the drawMBL() page.

Usage

eraseMBL(shapeArray)

Parameters

  • shapeArray - An array of one or more shapes as JSON objects.

Example

This example erases a (solid) block of MBL of 200x200 pixels starting at the origin of the map
[h:rectangle	= "{'shape':'rectangle','x':0,'y':0,'w':200,'h':200, 'fill':1}"]
[h:objectArrary	= json.append('',rectangle)]
[h:eraseMBL(objectArrary)]

See Also