I am just getting started learning python scripting in the game engine, and have some ideas for scripts I want to write, but I can’t find any tutorials that help me figure out hoe to write them, although I looked at some beginner tutorials. I would like to know how to make a python controller activate an actuator based on input from sensors, and also how I could have an object track to(exactly like the track to actuator) another object, but change which object it tracks to depending on input from sensors. I would appreciate it very much if someone could help me out.
There are some resources on Python scripts here on the forums. Also, I have been making some tutorials about Python scripting in the BGE - perhaps you would be interested in checking them out as well. The link is in my signature. There’s not really too much info on a lot of features / functions available in Blender or the BGE.
Check the resource forum for links to learn Python. Making an “if” statement checking the opposite is basic programming. So learn that first. (My suggestion as usually “byteOfPython.pdf”).
Than check the BGE API. You will need it. Especially some methods are deprecated (like isPositive()). The API tells you what to use instead.
I read through some of “A Byte of Python”, like you suggested, and I understand enough to finish my script now, but I looked at the BGE API and couldn’t find what to use instead of isPositive() (It’s confusing to navigate for me). Could you either tell me, or tell me where to look in the API?