Im trying to get 2 modules to work together and get executed from MainScript
MainScript:
import Map
#calling the "Map.module" from mainscript
def map():
Map.module()
return
This is what "Map.module" looks like:
import bge
import Functions
class module():
def __init__(self):
self.cont = bge.logic.getCurrentController()
self.own = self.cont.owner
self.openmap = self.cont.sensors["m"]
self.oooopenmap()
def oooopenmap(self):
if self.openmap.positive:
###Add Functions.py module here:
Functions.module()
And this is what "Functions.module", getting executed when openmap.positive is true, looks like:
import bge
class module():
def __init__(self):
self.cont = bge.logic.getCurrentController()
self.own = self.cont.owner
self.pause = self.own.actuators["Pause"]
self.pausee()
def pausee(self):
self.cont.activate(self.pause)
The console gives me this keyError:
Traceback (most recent call last): File "test.py", line 14, in File "test.py", line 10, in functions File
"\Functions.py", line 23, in main KeyError: 'requested item "Scene" does not exist'
Or to probably point a finger at my problem this ValueError:
Traceback (most recent call last): File
"Main.py",line 18, in map File
"Map.py",line 27, in init File
"Map.py",line 36, in oooopenmap File
"Functions.py",line 22, in init File
"Functions.py",line 26, in pausee ValueError: Pause not in this python controllers actuator list
can someone help ?
greetz