Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gamelogic_basic.py « templates « scripts « release - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e7d19672feb39baaa6e61567214b9e3bd91cc91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

def main():

    cont = GameLogic.getCurrentController()
    own = cont.owner

    sens = cont.sensors['mySensor']
    actu = cont.actuators['myActuator']

    if sens.positive:
        cont.activate(actu)
    else:
        cont.deactivate(actu)

main()