@name Prop Explosion
@persist Prop:entity Prop2:entity Prop3:entity Prop4:entity Sounds:array Materials:array Props:array Props2:array Props3:array Props4:array
@model models/props_phx/misc/egg.mdl
if(first()){
}
runOnTick(1)
#[Strings]#
Sounds[0, string] = "ambient/explosions/explode_1.wav"
Sounds[1, string] = "ambient/explosions/explode_2.wav"
Sounds[2, string] = "ambient/explosions/explode_3.wav"
Sounds[3, string] = "ambient/explosions/explode_4.wav"
Sounds[4, string] = "ambient/explosions/explode_5.wav"
Sounds[5, string] = "ambient/explosions/explode_6.wav"
Sounds[6, string] = "ambient/explosions/explode_7.wav"
Sounds[7, string] = "ambient/explosions/explode_8.wav"
Sounds[8, string] = "ambient/explosions/explode_9.wav"
#[Variables]#
One = 0
P = owner()
E = entity()
C = changed(owner():keyUse())
E1 = owner():keyAttack2()
if(C&$E1){
if(One)
{
    One = 0
}else{
PE = owner():aimEntity()
if(PE:type()=="prop_physics")
{
    One = 1
}
}
}
if(One){
    PE:propBreak()
    PE:soundPlay(0,0,Sounds:string(round(random(8))))
    Prop = propSpawn("models/hunter/plates/plate.mdl", PE:pos()+(vec(0,0,0)), PE:eyeAngles(), 0)
    Prop2 = propSpawn("models/hunter/plates/plate.mdl", PE:pos()+(vec(0,0,0)), PE:eyeAngles(), 0)
    Prop3 = propSpawn("models/hunter/plates/plate.mdl", PE:pos()+(vec(0,0,0)), PE:eyeAngles(), 0)
    Prop4 = propSpawn("models/hunter/plates/plate.mdl", PE:pos()+(vec(0,0,0)), PE:eyeAngles(), 0)
    Prop:setMaterial("phoenix_stroms/chrome")
    Prop:propGravity(0)
    Prop:setTrails(random(1,50),1,0.5, "trails/smoke", vec(random(255),random(255),random(255)),250)
    Prop2:setMaterial("phoenix_stroms/chrome")
    Prop2:propGravity(0)
    Prop2:setTrails(random(1,50),1,0.5, "trails/smoke", vec(random(255),random(255),random(255)),250)
    Prop3:setMaterial("phoenix_stroms/chrome")
    Prop3:propGravity(0)
    Prop3:setTrails(random(1,50),1,0.5, "trails/smoke", vec(random(255),random(255),random(255)),250)
    Prop4:setMaterial("phoenix_stroms/chrome")
    Prop4:propGravity(0)
    Prop4:setTrails(random(1,50),1,0.5, "trails/smoke", vec(random(255),random(255),random(255)),250)
    Props:pushEntity(Prop)
    Props2:pushEntity(Prop2)
    Props3:pushEntity(Prop3)
    Props2:pushEntity(Prop4)
    timer("Delete",750)
    }
    if(clk("Delete")
        & Props:count()) {
    Props:shiftEntity():propDelete()
    Props:propDelete() stoptimer("Delete")
}
if(clk("Delete")
        & Props2:count()) {
    Props2:shiftEntity():propDelete()
    Props2:propDelete()
}
if(clk("Delete")
        & Props3:count()) {
    Props3:shiftEntity():propDelete()
    Props3:propDelete()
}
if(clk("Delete")
        & Props4:count()) {
    Props4:shiftEntity():propDelete()
    Props4:propDelete()
}
    
