Hello my friends!
I have two Python related question for you all.
My project has a building-creation aspect similar to Sim City. One creates a building by selecting a plot to build on, then clicking the desired building type in a list. The list works by sending a message with the desired building type. Each “plot” has a large number of message sensors, one for each building type. /// My question is, is there a way I could whittle this down to one message sensor, and have the Python script watch the message subjects? There is already a script to control the actuator which watches to see which message is received by which sensor is firing. It could be far more efficient if the script itself could simply watch all message activity and respond appropriately.
As I said, in the game the user can make buildings. The buildings are created by an Add Object actuator. Now, I also want people to be able to demolish buildings. What would be the best way to go about demolishing only one instance of a building? (i.e, if there are two hotels, I can demolish only one hotel and leave the other). Each building instance is contained in a selectable “plot”, which could potentially be useful. As these objects are created in-game, this sort of operation is unusually complicated.
For the record, the game is not a clone or a remake of SimCity. It is something entirely different which contains aspects similar to SimCity. You’ll see soon enough.