If you want to survive, learn Python. If you dont't know Python, this can be very difficult to understand. You have to learn at least the basics.
This is an example of a simple python script used to activate an actuator.
import Range # for blender game engine -> import bge
cont = Range.logic.getCurrentController() # again, for bge -> bge.logic.getCurrentController()
own = cont.owner
def yourFunc(cont):
if own.sensors["your_sensor"].positive:
cont.activate(own.actuators['your_actuator'])
import Range is importing the Range module. If you know about true level triggering, importing a module again and again in a loop can affect performance. If you are a guy who's concerned about performance, this is for you.
In cont = Range.logic.getCurrentController() we're defining cont as Range.logic.getCurrentController(). This means you are getting the current Python controller which is one of the controllers list (and, or, nor, nand, xor, xnor) associated with our python code. With that controller, you do stuff.
cont.owner Getting the cont's owner helps you to get all data and put inside an object. If you're getting camera data, you'll be connecting the logic brick to the camera. If you're getting light object's data, you'll be connecting the logic brick to light. Or you'll be facing some issues.
def yourFunc(cont): As I mentioned earlier, importing the Range module or the bge module is not good. So we get the data from the imported module once and do all the stuff inside the function in a looped manner. The cont inside yourFunc
if own.sensors["your_sensor"].positive: This line says that if that certain object and that object's sensor which is in the list sensors is positive, which is your_sensor then we do our stuff.
cont.activate(own.actuators['your_actuator']) Here we are activating our actuator your_actuator which is in the actuators list.