Selectable objects with buttons/commands

Hi, Is there a python script to make an object the active object for commands? Like having a fire button and making the selected tanks or something fire.

therer are many ideas to make this.
I use a Mouse Controller Obejct wich stores the hitObject in a dict. So the active, means the selected object is written there.
It depends of what exactly you are trying to do, what a selsectet Object is and what the logic of this object is.

Any Function related to the hitObject will always
only work for it, and no other Objects.

U could use a Property to store the selactability and the select status.