@name FailCake Survival EP2 Signal
@persist GTABLE:gtable E:entity ID GetVal
@trigger all
@model models/props_mining/antlion_detector_lights_base.mdl
interval(100) 

function void translate(GetVl){
if(GetVl == 1){
holoSkin(1,1)
holoSkin(2,0)
holoSkin(3,0) 

}
if(GetVl == 2){
holoSkin(1,1)
holoSkin(2,1)
holoSkin(3,0) 

}

if(GetVl == 3){
holoSkin(1,1)
holoSkin(2,1)
holoSkin(3,1) 
}    
}


if(duped() | first())
{
E = entity()

GTABLE = gTable("streamsco",2)  

holoCreate(1)
holoModel(1,"models/props_mining/antlion_detector_lights_lamp.mdl")
holoPos(1,E:toWorld(vec(0,0,80)))
holoAng(1,ang(0,90,0))

holoCreate(2)
holoModel(2,"models/props_mining/antlion_detector_lights_lamp.mdl")
holoPos(2,E:toWorld(vec(0,0,60)))
holoAng(2,ang(0,90,0))

holoCreate(3)
holoModel(3,"models/props_mining/antlion_detector_lights_lamp.mdl")
holoPos(3,E:toWorld(vec(0,0,40)))
holoAng(3,ang(0,90,0))


for(I=1,4){
holoParent(I,E)
}

ID = GTABLE["ID",number]
GTABLE["ID",number] = GTABLE["ID",number] + 1

}

if(GTABLE["Active_"+ID,number] == 1){
GetVal = GTABLE["DIF_"+ID,number]  

if(changed(GetVal) & GetVal){
E:soundPlay(1,0,"buttons/button16.wav")   
}

translate(GetVal)

}else{
holoSkin(1,0)
holoSkin(2,0)
holoSkin(3,0) 
}


