Serious noob...i need help

I just started using blender recently, and Im having problems with “GameLogic” being in my script. I always get an error saying “Gamelogic” is not defined. How do I properly go about defining Gamelogic? Are my user settings incorrect or maybe the file structure?? ALso, I have a hovercraft model that Im trying to add movement to. I have the easy stuff done…forward, left, right, ect…but I was wondering how I would go about adding a bank to my turns and creating the effect of momentum? I want it so when I tap the gas, the craft slides forward for a bit and doesnt stop suddenly. Not sure if Im asking for a lot, but ANy help or sample code would be great. Also if there are any videos that go over the things im talking about, that would be cool to. Sorry my first post has to be like this. I normally use maya, but blender has the game engine and thats whats attracting me to it

dude you forgot to import GameLogic module

import GameLogic
GameLogic.fn_name()

For 2.5x python
http://blenderartists.org/forum/showthread.php?t=206933

And do checkout the 2.49b python API found here
http://www.blender.org/documentation/249PythonDoc/GE/index.html

& read thishttp://wiki.blender.org/index.php/Doc:Manual/Game_Engine

Also do a search on the forums.
Which blender version are you using? 2.49b? or 2.5x?

[QUOTE=saga;1774723]dude you forgot to import GameLogic module

import GameLogic
GameLogic.fn_name()

No…im not forgetting import GameLogic. Like I said…whenever Gamelogic is in my script, the script throws an error like it cant find it. Where would GameLogic normally be?

Upload a blend file or post the code here. that would be more helpful.

You don’t need to import GameLogic- in 2.49 and below it’s automatically imported in every script, and in 2.5x it’s bge.logic (you will need to import bge for that) Also, make sure it’s capitalized right. Gamelogic and gamelogic are wrong.

This may sound like a stupid suggestion, but I’ve seen plenty of people get this wrong- make sure you’re running the game by pressing P while your mouse is over a 3d window, not running scripts with alt-p.

Python is a case-sensitive language. Make sure to spell it GameLogic with a capitol g and a capitol l. In Blender 2.5x you can use either bge.logic or GameLogic, but you have to import them.

@gomer - Actually, in the newer Blender 2.5 builds, GameLogic doesn’t work at all. You have to use bge.logic.

For the hovercraft movement I would use linear velocity (linV in the logic brick). With it you can set how long it takes for the object to reach a sertain speed. It looks alot more realistic for movement and will also give you the effect you want for stopping.

As for the banking you can make an animation of the hovercraft banking left and right and connect the ipo actuator for them to the keys that make it turn and set them to ‘flipper’, that way it will play to the end of the animation and stay banked throughout the turn and once you release the key it will play backwards until it levels out again. You could also do something simmilar for forwards and backwards to add more realism to the movement if you want.