@name Explosion
@inputs 
@outputs 
@persist Swarm:entity Com Break Dog:entity SpawnCount
runOnTick(1)
runOnChat(1)
if(first()) 
{
    timer("Start", 10)
    SpawnCount = 0
}


Chat = owner():lastSaid()
Com = Chat:find("Explode")
Break = Chat:find("|")
if(Com & chatClk(owner()))
{ 
    ChatArr = Chat:explode("|")
    Dog = findPlayerByName(ChatArr[2,string])
    Swarm = propSpawn("models/props_c17/oildrum001_explosive.mdl", 0)
    Swarm:propGravity(0)
    Swarm:setMass(50)
    Swarm:setMaterial("phoenix_storms/stripes")
    Swarm:setAlpha(0)
    #Swarm[SpawnCount:toString(),entity]:setTrails(200,100,200,"phoenix_storms/stripes",vec(255,255,255),255)
    Swarm:setNoCollideAll()
}

if(Dog:isAlive() & Swarm:isValid())
{
    Swarm:teleport(Dog:pos())
    Swarm:takeDamage(10000)
}
