stopping track to actuator to work

any1 have an idea how to stop an actuator like editObject - track to from working.
I would like that ‘track to’ will work only when the object is Not standing still or Not already turning, so it will work only when its ‘available’.
I’m using python and i setup a condition to cont.activate(track_to)
but it seems that once its turned on, then it’s all the time on. so i wonder if there is some function to stop actuators from working.
I tried also to change track_to.object = None
but this command line doesn’t seem to work with python in the new blender.
any ideas?

ok, it seems that if i use the property sensor in the logic bricks as a condition then it works…
so if the walk property equel 0.5 (which means he is not stopping) then he is using trackTo otherwise (if he stop) then he don’t use it.
I don’t know why it’s not working with python, if i just use for example
if obj[‘walk’] != 0:
cont.activate(track_to)

I also tried to import the prop sensor into python but it seems like he can’t get it. does any1 know if it’s broken?

Try this:


cont = bge.logic.getCurrentController()
prop = cont.sensors['Property']

if prop.positive:                #activate when sensor prop is triggered
    cont.activate(track_to)
else:                                  #deactivate
    cont.deactivate(track_to)

I think this should help

AHA
I don’t know why my property sensor didn’t work, but I was actually just looking for the deactivate function.
thanks!