Material Changing widget for Archwiz

I am working on an archviz and i would like to do the following:

  • When user clicks object, set an actor variable called “material_change_target” to the object clicked, freeze player movement and display widget with material swatches. ( i am kind of getting this far )
  • For the sake of this question, let’s say we got 10 materials, all different colors. When the user clicks one of the buttons (let’s say green), set the object sitting in the “material_change_target” material to a material from the editor (in this case green).
  • Then, when the player is satisfied with the color, if he presses a keyboard key he gets back to being able to click on other objects to change their material.

I am struggling with this for a couple of days, thanks in advance guys!