GameLogic not defined?

I’ve been trying to make a simple movemnt script but the console keeps saying ‘GameLogic’ is not defined.

the first line of script is:

cont = GameLogic.getCurrentController()

Can anyone please help me with this probably simple problem?

Add this line before your line:

import GameLogic

You need to import GameLogic before you use it.

Hmm, that’s strange - I thought GameLogic was imported by default in the game engine.

If you’re looking for Blender Game Engine python help, be sure to check out the Game Engine forums.

Thanks. Yeah, i thought it was done by default too. Strange.