erasePitVBL: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page erasePitVBL to ErasePitVBL without leaving a redirect: Converting page title to first-letter uppercase)
m (Conversion script moved page ErasePitVBL to erasePitVBL: Converting page titles to lowercase)
 
(One intermediate revision by the same user not shown)
(No difference)

Latest revision as of 23:59, 9 February 2023

erasePitVBL() Function

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

Introduced in version 1.11.0
Erases Pit Vision Blocking Layer (Pit VBL) shapes from the Map VBL. This function does not affect Token VBL.

This function works the same as drawPitVBL() with the difference that drawPitVBL() draws the shapes on the Pit Vision Blocking Layer and erasePitVBL() erases them. For more examples go to the drawPitVBL() page.

Usage

erasePitVBL(shapeArray)

Parameters

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

Example

This example erases a (solid) block of Pit VBL 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:erasePitVBL(objectArrary)]

See Also