I can not get Python to work, I have followed YT videos and do exactly what they have done but I only get error message:
No module name 'bge'
I have searched on Google, but I cannot find similar answers. What is wrong?
At the top of my script I do have import bge
Although, I read somewhere that the inport BGE has changed.
But I'd really like to get this to succeed. I can get my game to work without python but I'd rather not and it would make it too complicated.
I'm using version 2.77.
And this is the Script I trying
import bge
def main():
cont = bge.logic.getCurrentController()
own = cont.owner
message = cont.actuators["message"]
remove = cont.actuators["remove"]
own.text = "I don't want to talk."
if own["time"] > 0:
own["time"] -= 1
if own["time"] <= 0:
cont.activate(message)
cont.activate(remove)
main()
Also this is the youtube clip I follow. https://www.youtube.com/watch?v=8klSGN1m5no&list=LLi0N8WDVMrYgCK_ni5ajv5g&index=5