Skip to reading
PCA Script Programming

set2d_layer_visible()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Show / Hide 2D Layer | Action ID: Set2DLayerVisible

Show or hide a named 2D layer.

Source table from set2d_layer_visible(), page 144
Option key / fieldMeaning and accepted inputDefault
Room (empty = current) sceneIdChoose a scene ID. May be blank.Blank
2D Layer ID layerIdText.Blank
Visible visibleExplicit visible/hidden state.true

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
set2d_layer_visible({"sceneId": "lab", "layerId": "", "visible": true})

In use. Hide a foreground curtain layer after it opens. Select the layer ID used by the room, not the ID of an image asset imported into the project.

set2d_entity_depth()#

Set 2D Entity Depth | Action ID: Set2DEntityDepth

Change an entity's sorting depth in the 2D/hybrid scene.

Source table from set2d_layer_visible(), page 144
Option key / fieldMeaning and accepted inputDefault
Room (empty = current) sceneIdChoose a scene ID. May be blank.Blank
2D Character / Object entityIdChoose an entity in the selected scene.Blank
Drawing Depth depthWhole number.100

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
set2d_entity_depth({"sceneId": "lab", "entityId": "archive_door", "depth": 100})

In use. Adjust a foreground prop's depth so it appears in front of the intended sprites. Depth is drawing order; it is not a height coordinate or a collision box dimension.

Page 144 of 357Permalink
Go to page