2.49 script - 2.54 script, please

If its not too much trouble, can someone please turn this 2.49 script into a 2.54 script. Or, better yet, tell me where I can find a BGE API reference.

Code : : :

import GameLogic

cont = GameLogic.getCurrentController()

obj = cont.owner

angVel = obj.getAngularVelocity(True)

linVel = obj.getLinearVelocity(True)

act = cont.actuators["Add sparky sparky"]

Spark = act.angularVelocity

if angVel > 1 and linVel > 1 :
    cont.activate("Spark")

Thanks a whole heaping bunch,
loves and kisses
, Tom Cat :wink:

if angVel > 1 and linVel > 1 :

I think you made a few mistakes there. angVel and linVel are vectors, so they consist of three values. You can’t compare that to one value. Also you have

cont.activate("Spark")

but I think it should be without quotation marks :rolleyes:

A guide to converting scripts:

BGE and Blender Python API reference (2.5):
http://www.blender.org/documentation/250PythonDoc/