get_layer

function

get_layer(_x, _y[, _threshold])

Description

Retrieves the topmost splatmap layer at given coordinate.

Arguments

Name Type Description
_x Real The x coordinate to retrieve the layer at.
_y Real The y coordinate to retrieve the layer at.
_threshold Real The minimum required opacity. Defaults to 0.5.

Returns

Real/Undefined The topmost splatmap layer at given coordinate. Returns undefined if the coordinate is outside of the terrain or if no layer was found.

Note

Method BBMOD_Terrain.build_layer_index needs to be called first!

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on June 19, 2022 using GMDoc.