[Solved] Extracting raster values to another raster in Google Earth Engine? [closed]

EmmaE Asks: Extracting raster values to another raster in Google Earth Engine? [closed]
I have three different rasters: a utilization distribution (UD) raster (values 0 – 0.5), a tree layer (0 or 1) and a ndvi layer (0 – 1).

What I would like to do (if possible) is merge my UD raster with my tree layer raster (so I end up with a raster with pixels with a UD value and a 0 or 1 for whether there is a tree or not in the layer). Following that, for every pixel that contains a 1, I would like to extract an NDVI value.

How can I go about trying to do this?

Apologies for not providing any code to work with, I am not even sure where to begin with this and have not found other threads yet that do something similar.

Due to the sensitive nature of the UD file I am unable to share it.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.