@name 
@inputs 
@outputs 
@persist HOLONUM
@trigger 
#exit()
if (first()) {
    HOLONUM = 50
    holoCreate(1)
    holoModel(1,"models/buildables/sentry1_heavy.mdl")
    holoAnim(1,"build")
    timer("1",holoAnimLength(1)*1000)
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoCreate(I)
            holoModel(I,"models/buildables/sentry1_heavy.mdl")
            holoAnim(I,"build")
            holoPos(I,entity():pos()+vec(0,60*(I-1),0))
        }
    }
} elseif (clk("1")) {
    holoModel(1,"models/buildables/sentry1.mdl")
    timer("2",1000)
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoModel(I,"models/buildables/sentry1.mdl")
        }
    }
} elseif (clk("2")) {
    holoModel(1,"models/buildables/sentry2_heavy.mdl")
    holoAnim(1,"upgrade")
    timer("3",holoAnimLength(1)*1000)
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoModel(I,"models/buildables/sentry2_heavy.mdl")
            holoAnim(I,"upgrade")
        }
    }
} elseif (clk("3")) {
    holoModel(1,"models/buildables/sentry2.mdl")
    timer("4",1000)
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoModel(I,"models/buildables/sentry2.mdl")
        }
    }
} elseif (clk("4")) {
    holoModel(1,"models/buildables/sentry3_heavy.mdl")
    holoAnim(1,"upgrade")
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoModel(I,"models/buildables/sentry3_heavy.mdl")
            holoAnim(I,"upgrade")
        }
    }
    timer("5",holoAnimLength(1)*1000)
} elseif (clk("5")) {
    holoModel(1,"models/buildables/sentry3.mdl")
    if (HOLONUM) {
        for(I=2,HOLONUM) {
            holoModel(I,"models/buildables/sentry3.mdl")
        }
    }
}