Actionsup = 0
overlays += image('BotanyUI.dmi',"Extract")
usr.Actionsup = 1
usr << output ("[usr] attempts to extract [src].", "output1")
overlays -= image('BotanyUI.dmi',"Extract")
usr.Actionsup = 0
usr << output ("[usr] no longer attempts to extract [src].", "output1")
icon = 'Lilac.dmi'
icon_state = ""
layer = 7
I'm trying to make a UI for displaying interaction options an object has. However, I can't seem to get the code to do what I want. The code I have works fine when dealing with one plant alone, but when I have two or more and I right click on one, then the other, it doesn't close the first one. Instead, both have a UI up. I need to make right clicking on one close any other UI that is up before bringing up a new one.