I just started to study blender and its scripts and tried to run my sample code
import bge def main(): cont = bge.logic.getCurrentController() own = cont.owner sens = cont.sensors['mySensor'] actu = cont.actuators['myActuator'] if sens.positive: cont.activate(actu) else: cont.deactivate(actu) main()
and get the following error: ImportError: There is no module named 'bge' I searched for a solution but could not find it. How to solve this problem? i am using blender 2.65
python blender
vaibhav
source share