@name alleyDefence2
@inputs 
@outputs Height SpawnWidth
@persist 
@trigger 


if(first()){
    SpawnWidth = 300 # Width for spawning enemies and determining space between boundary "logs"
    
    
    
for(I=1000,1060){
    holoCreate(I)
    }
    
    # GROUND
    holoModel(1000, "models/hunter/plates/plate16x16.mdl")
    holoMaterial(1000, "shadertest/seamless7")
    #holoMaterial(1000, "phoenix_storms/ps_grass")
    holoScaleUnits(1000, vec(6000,6000,3))
    holoColor(1000, vec(255))
    
    # FOG
    holoModel(1001, "models/sprops/rectangles/size_90/rect_90x90x3.mdl")
    holoMaterial(1001, "models/effects/vol_lightmask02")
    holoScaleUnits(1001, vec(6000,6000,4))
    holoColor(1001, vec(155)) # CHANGES FOG VISIBILITY
    
    # FULL-BLACK DOME 
    holoModel(1002, "models/hunter/misc/shell2x2a.mdl")
    holoMaterial(1002, "debug/debugdrawflat")
    holoScaleUnits(1002, vec(5000,5000,5000))
    holoColor(1002, vec(0))
    
    # DARKNESS DOMES
    for(I=1003,1030){
        holoModel(I, "models/hunter/misc/shell2x2a.mdl")
        holoMaterial(I, "debug/debugdrawflat")
        holoScaleUnits(I, vec(5000-((I-1000)*80),5000-((I-1000)*80),5000-((I-1000)*80)))
        holoColor(I, vec(0))
        holoAlpha(I, 45)
        }
        
    # BOUNDARY LOG 1#
    holoModel(1031, "models/props_foliage/driftwood_02a.mdl")
    holoPos(1031, holoEntity(1000):toWorld(vec(0,SpawnWidth/2,-10)))
    holoAng(1031, holoEntity(1000):toWorld(ang(0,5,0)))
    #holoColor(1031, vec(0))
    
    # BOUNDARY LOG 2#
    holoModel(1032, "models/props_foliage/driftwood_02a.mdl")
    holoPos(1032, holoEntity(1000):toWorld(vec(0,-SpawnWidth/2,-10)))
    holoAng(1032, holoEntity(1000):toWorld(ang(0,185,0)))
    #holoColor(1031, vec(0))
    
    # BOUNDARY LOG 3#
    holoModel(1033, "models/props_foliage/driftwood_01a.mdl")
    holoPos(1033, holoEntity(1000):toWorld(vec(480,-SpawnWidth/2,-10)))
    holoAng(1033, holoEntity(1000):toWorld(ang(0,176,0)))
    #holoColor(1031, vec(0))
 
    # BOUNDARY LOG 4#
    holoModel(1034, "models/props_foliage/driftwood_03a.mdl")
    holoPos(1034, holoEntity(1000):toWorld(vec(350,-20+SpawnWidth/2,-7)))
    holoAng(1034, holoEntity(1000):toWorld(ang(0,140,0)))
    #holoColor(1034, vec(0))
    
    # BOUNDARY LOG 5#
    holoModel(1035, "models/props_foliage/driftwood_01a.mdl")
    holoPos(1035, holoEntity(1000):toWorld(vec(610,-20+SpawnWidth/2,0)))
    holoAng(1035, holoEntity(1000):toWorld(ang(0,2,90)))
    #holoColor(1035, vec(0))
    
    # BOUNDARY LOG 6#
    holoModel(1036, "models/props_foliage/driftwood_01a.mdl")
    holoPos(1036, holoEntity(1000):toWorld(vec(-510,-20+SpawnWidth/2,0)))
    holoAng(1036, holoEntity(1000):toWorld(ang(0,4,90)))
    #holoColor(1036, vec(0))
    
    # BOUNDARY LOG 7#
    holoModel(1037, "models/props_foliage/driftwood_01a.mdl")
    holoPos(1037, holoEntity(1000):toWorld(vec(-480,-SpawnWidth/2,-10)))
    holoAng(1037, holoEntity(1000):toWorld(ang(0,176,0)))
    #holoColor(1031, vec(0))
    
    # BOUNDARY LOG 8#
    holoModel(1038, "models/props_foliage/driftwood_02a.mdl")
    holoPos(1038, holoEntity(1000):toWorld(vec(1110,SpawnWidth/2,-5)))
    holoAng(1038, holoEntity(1000):toWorld(ang(-2,5,30)))
    #holoColor(1038, vec(0))
    
    # BOUNDARY LOG 9#
    holoModel(1038, "models/props_foliage/driftwood_02a.mdl")
    holoPos(1038, holoEntity(1000):toWorld(vec(1110,-SpawnWidth/2,-5)))
    holoAng(1038, holoEntity(1000):toWorld(ang(-2,5,30)))
    #holoColor(1038, vec(0))
       
}
