import Blender import math import GameLogic O = GameLogic.getCurrentController().getOwner() # set RunOnce to 1 if not O.AIInit: O.AIInit = 1 mVar.GameLogic = 1 print 'init' else: mVar.GameLogic += 1 print 'inited' #print mVar.GameLogic