2 quick questions. I don’t know much python yet, so I’m looking for a bit of scripting help.
1.How do I set up a global variable for the enemy count and have objects check that variable? I have empties adding enemies and I’d like them to stop if there’s a certain number already generated. There’s different classes of enemies, so I’d like to take that into account as well. Then when an enemy dies, it needs to send -1 to the global variable for it’s class.
- Is there a good python alternative to the near sensor? It drags down the engine too much and I’m lookiing for a way around it. I thought maybe there was a way to get position of the player and periodically check to see how close it is to the enemy generator (Maybe even having the player position being a global variable as well). Any thoughts?
Also, if anyone has any general tips on creating/managing enemies in the Game Engine, I’d love to hear them. It doesn’t seem to come up much.