How to end an actuator?

I’m helping out with a test game here:

http://blenderartists.org/forum/showthread.php?t=136170

I have an object CubeExplode, with a Boolean Property “TargetLock” False.

CubeExplode has a Message Sensor which sets TargetLock True when it receives a message from missletraceempty.py (which targets an object with ray sensor).

CubeExplode has a Property Sensor which uses two actuators to play a sound and RGB IPO, which both loop forever.

What is not working is that I want CubeExplode to listen for a Message Sensor to set TargetLock False and END the two Actuators (IPO Play and Sound Loop), so I have it connected to this script below and a Property Actuator.

cancellock.py

# end Target Lock On Indicators
cont=GameLogic.getCurrentController()
lockonipo=cont.getActuator("Lockonipo")
lockonsnd=cont.getActuator("Lockonsnd")
GameLogic.addActiveActuator(lockonipo, 0)
GameLogic.addActiveActuator(lockonsnd, 0)

However, this does not stop the Sound or IPO. I have tried directly connecting a Key Sensor to this script (and the Property set false actuator) to isolate the problem, but this does not work either.

Is there an “EndAcutator” sort of command or another way to do this?

Relevant .blend file is attached here (though this part of the logic is a bit of a mess now):

http://blenderartists.org/forum/showpost.php?p=1220301&postcount=41

Attachments


If anyone has any suggestions, I would be grateful.

Am I taking the wrong approach to the problem?

I also have another semi-related logic brick/sensor/actuator question about a flame engine thruster effect.

I created an “Edit Object/Add Object” particle emitter effect based on these tutorials:


For the effect to work, both objects have their own timers and the emitter has an Always On sensor.

I wanted to have a default idling low burn effect, without long trails when coasting. Then I also wanted to active a higher intensity longer trail version when the W forward movement key is pressed.

Since the emitter effect requires an Always on Sensor, how to I get a key press or message signal to activate an always on sensor only when the key is pressed and held? I tried a few combinations of logic bricks and properties, but none of them gave me the proper continuous emitter effect. I tried different time settings, but I would only get a brief spurt, rather than a continuous emission when the key was pressed and held.

A related question, is there a Key Up sensor? Or will something like a Key Pulse False sensor work for that?

The blend shows the effect, but no Key press logic because it wasn’t working. Thrust_emitter and Thrust_trail are on layer one and Trust_main and Thrust_particle are on layer two.

Attachments

thrust_emitter.blend (329 KB)