Decal API

editor.selectDecalTemplate(name)
Parameters:name – the name of the decal template

Select the current decal template for the decal brush

editor.createDecalTemplate(decal)
Parameters:decal – the decal template table, with the fields:

Create a new decal template to paint with.

editor.deleteDecalTemplate(name)
Parameters:name – the decal template name

Delete decal template by its name.

editor.getDecalTemplates()
Returns:the decal templates table with the keys being the decal template names and the values the info tables with the fields:
editor.paintDecalInstance(x, y)
Parameters:
  • x – the top-down x coordinate on the terrain
  • y – the top-down y coordinate on the terrain

Paint the current decal template as an instance on the terrain.

editor.getDecalInstances()
Returns:the decal instances painted in the level as object IDs array
editor.deleteDecalInstance(instanceId)
Parameters:instanceId – the object id of the decal template instance

Delete the instance of the decal template.