-I was working on Global Variables in Blender.The best way I found, was to write a python script where to initiate all Global Variables.Then import it as module and use the variables in the form:
-Then their value can be changed in this way:
ModuleName.dict[“variable”] = newvalue
-In this way every script can have common variables which can be changed(in realtime) in any script and can be read by all other scripts without sending messagges,adding properties with the same name or connecting different object bricks.Distributing .blend files this module must be in the python path,but distributing executables it may be where the executable is.
-To test this I made a game.It is MasterMind(I think anyone knows it), a 2D simple game.In the zip file there are two files:Mastermind.blend(with which you know what to do) and MMcolors.py ,which must be in the Python path or Blender folder otherwise the game doesn’t work.In the Blender 2.25 it needs to be in full screen,while in 2.23 it works in windows too.Link: