opacityLayerOnEnter() Function Reference

opacityLayerOnEnter(string layer, integer opacity)

Sets the opacity of an entire layer when a character is on one of that layers tiles. Useful for toggling the opacity of walls for example. Acceptable values range 0 to 100, where 100 is fully opaque and 0 is fully transparent.

For better performance, if you want the layer to become fully transparent, use hideLayerOnEnter() instead. This prevents rendering of that layer rather than rendering something that can't be seen.

Rather than calling opacityLayerOnEnter() manually, refer to the loadTiledMap() documentation as Qiso can set all of this up internally, using custom layer properties.