@name See Four
@inputs Arm
@outputs Xplode Lamp Active
@persist Time
@trigger all
if(Arm & !Active){
    Active = 1
    Time = 45
    timer("countdown", 1000)
    timer("beep", 1000)
}
if(clk("countdown")){
    Time--
    timer("countdown", 1000)   
    print(toString(Time))
    if(Time<=0){
        Xplode = 1
        selfDestruct()
    }
}
if(clk("beep")){
    soundPlay(1, 0, "buttons/button15.wav")
    timer("beep", Time / 45 * 1000)
    Lamp = !Lamp
}
