How do I get a script to run just once at startup? I suppose it is a case of putting the right kind of sensor on to any old object and connecting it to a script controller, but I’m not sure what properties to give the sensor to make it work like that.
What about a way to run a script when I hit escape to end the game mode?
It’s so I can open and close the serial port. Reading from a serial port works well in python game engine by the way. It’s just that right now I have to open and close the port every time my reading script runs!