This function will return the current room being targeted by the layer functions. See layer_set_target_room() for more information.
layer_get_target_room()
Room ID (real)
if layer_get_target_room() != room
{
layer_reset_target_room();
}
();
The above code checks the current target room and if it is not the current room then the layer target room is reset.