I am making a game in which you have to shoot enemies, I have the properties all st up and stuff, and the kill counter shows in the debug properties, but the only way I can figure out how to show it in game uses almost 200 logic bricks. Is there any way I can use python to code a counter? Yes, I know i’m a noob, but we all have to start somewhere, right?
If you see the value in debug mode it means you have the value in a property. This is the essential step you need. Everything else is “just” display.
I do not know why you think you need 200 logic bricks. This sounds like the insufficient design. I recommend to use messages to send the value to a GUI element that simply displays the value in a form you want e.g. bar or number (text object) or both.
Please have a look at the BGE Guide to Messages incl. Healthbar tutorial. I think it teach you all you need for your goal.
Do you have a text plane set up? This will make your counting much, much easier.
http://www.tutorialsforblender3d.com/GameDoc/Text/Text_GLSL_Steps_1.html <<<A tutorial. It’s for 2.49b, but it’s easy to adapt.
An enemy counter is easy to set up without Python or too much logic. Use this tutorial and do some experimenting c:
but the f9 isn’t working in this, how do I fix that?