I am making a racing game and I want to know something: How do I make gauges for my game. I have 6 gears on car set by states, but only way to visualiate them is game debug. But game debug is ugly- I want to make fancy gauges. How do I make them?
Assuming the gauges are in an overlay scene, you'll need to establish communication with message sensors.
- Send a "gearUp" or "gearDown" message to the gauge when the gear changes
- Put message sensors on the gauge that execute whatever action you desire
Here's a quick sample - use the up and down arrow keys to send messages. https://dl.dropboxusercontent.com/u/19279604/static/misc/gauge_example.blend
If the gauges are in the same scene, then it's a whole lot easier. You can shift+click multiple objects and connect gauge actuators directly to the gear controller.
There really isn't a good way to copy properties between scenes with logic bricks. Here's a Python example that can be adapted to your needs:
import bge def copyProps(cont): # Get a reference to the object running the script own = cont.owner # Get a reference to the overlay scene overlay = bge.logic.getSceneList() # Find the object in the overlay scene other = overlay.objects['Speedometer'] # Copy the desired properties other['Text'] = own['speed'] if __name__ == '__main__': cont = bge.logic.getCurrentController() copyProps(cont)