'Tap' enabled in BGE Python

Hey, all! I want an actuator to be triggered only for an instant in my script. I don’t know what to write after cont.activate…

Is there an option in the API for enabling ‘tap?’

if ob['myProp'] == 0:
    ob['myProp'] = 1
if own.get('init',0) != 1:
    own['init'] = 1

and so you dont even have to add this “prop”

And I wouold assume that I wouold hook it up to an actuator with true level triggering?


you connect this script with one or more sensors. As it should activate the actuator just once, there is no need to activate TRUE or FALSE pulses.
And you connect this script with your actuator.
do not forget to add the actuator as parameters to cont.activate(actuator) and cont.deactivate(actuator)

I thought it was

if Insert-Name.positive and Insert-Name.tap:
Atleast that’s how I do it :confused:

PS: ‘Tap’ has to be enabled on the sensor.