class ACTION_WeldDoor extends ScriptedAction;

var(Action) name DoorTag;
var(Action) float WeldAmount;

function bool InitActionFor(ScriptedController C)
{
    local KFDoorMover door;
    
    ForEach C.DynamicActors(class'KFDoorMover', door, DoorTag) {
        if ( !door.bClosed ) 
            break;
            
        if ( WeldAmount < 0 )
            door.MyTrigger.UnWeld(min(door.MyTrigger.WeldStrength, -WeldAmount), false, C.Pawn);
        else
            door.MyTrigger.AddWeld(WeldAmount, false, C.Pawn);
        
        break;
    }
    
    return false;
}

defaultproperties
{
}
