I have made a game recently. Sometimes the game will shut down (or crash) without an error message either form Blender or windows. The game will close when people are going buttonbashing. How can I automaticly restart my exe file when it’s closed?
Is it in Windows XP possible to check if an process in taskmanager is running and if it’s not run the process? Or are there other posibilities?
Yeah that’s true, but how can I else prevent people from buttonbashing? Also the game runs at an exhibit, so when it crashes it needs to automatticly run again.
Let me explain what happens.
The game only uses 3 action buttons, 2 buttons to walk forward and backwards and a trackball to rotate the direction the player is looking.
If you press an action button most of the time a menu pops up (wich are all overlay scenes), or the heads up display changes. If I quickly press 2 buttons (or press them at the same time) than menu’s will blend in eachother and that’s not what it’s suppose to be doing.
Also when I press several button at the same time and keep bashing them, blender will shut down, no error or someting, just shutting down.
More info: The game runs on Windows XP if that’s relevant
Has anybody have an idea how to prevent / solve this?
Disable the menu buttons while the action is being played. When the action is done, turn them back on. You can use python do to this or logic buttons.
To use Logic bricks, take a look at the thread below to see how Blendenzo did something similar with a switch true property. You’d put something like that on all of the buttons you want to disable while the action is running.
Python. Use a Global variable. Something like GameLogic.buttonReady = True. Set it to false while the action is running and back to true when the action is done. Then you’d use something like this on all of the buttons you want to disable
if GameLogic.buttonReady == True:
GameLogic.buttonReady = False
(code to run action)
When the action is done running, GameLogic.buttonReady = True