I strongly suggest to separate hover from activating. This makes the implementation much simpler.
Hover
There are two different designs to achieve hover:
Individual Hover
Each objects handles the hover by itself. This is fine when each object has a different way to present hover
E.g.
Mouse Over Sensor -> AND -> Action Actuator Mode:Flipper Action: Hover.Action
Hover Controller
One object the Hover Controller handles all hover and performs the according actions. Due to it's dynamic behavior you need to Python to do that.
Mouse Over Any Sensor -> Python
import bge
COLOR_HOVERRED = [1, 0, 0, True]
controller = bge.logic.getCurrentController()
storage = controller.owner
sensors = controller.sensors
mouseSensor = sensors[0]
if mouseSensor.positive:
hoverredObject = mouseSensor.hitObject
storage["last hoverred"] = hoverredObject
storage["original color"] = hoverredObject.color.copy()
hoverredObject.color = COLOR_HOVERRED
else:
lastHoverred = storage.get("last hoverred")
if lastHoverred:
lastHoverred.color = storage["original color"]
This code is based on your sample. When you want to hover certain objects only you can setup a filter property (e.g. "hoverable") at the mouse sensor and give each Object an according property "hoverrable".
Button Click
The button click is very simple and you do not necessarily need Python
mouse over sensor + mouse click sensor -> AND -> actuator