I have always used the setDamage command for this situation using the ON variant of a lamp.
if (condition)then{
myFloodLight setDamage 098;
}else{
myFloodLight setDamage 0;
};
For Trigger.
In the Lights init (named myFloodLight for example)
myFloodLight setDamage 0.998;
OnAct
myFloodLight setDamage 0;
OnDeact
myFloodLight setDamage 0.998;
Setting the damage to 1 makes the light collapse and disappear.
( First post guys be gentle )