//-----------------------------------------------------------
//
//  - UnrealRider -  UR_SeqAct_GeneratorChangeState
//  Written/tested by Erwan Allain (zall1@hotmail.com)
//
//  Action changing ShieldVolume state according to UR_ShieldGenerator state
//
//-----------------------------------------------------------
class UR_SeqAct_EnableGenerator extends SequenceAction;

var() Object generator;

event Activated()
{
    local int i;
    if(InputLinks[0].bHasImpulse)
    {
        for(i=0; i<Targets.length; i++)
            if(Targets[i].IsA('UR_ShieldGenerator'))
                UR_ShieldGenerator(targets[i]).enableGenerator();
    }
}

defaultproperties
{
   bCallHandler=TRUE
   ObjName="GeneratorEnable"
   ObjCategory="UR_Action"
   InputLinks(0)=(LinkDesc="enable")
   VariableLinks(1)=(ExpectedType=class'SeqVar_Object',LinkDesc="generator",PropertyName=generator)
}