@name Holo
@inputs 
@outputs 
@persist I Rotation
@trigger 
@model models/madman07/supergate_dhd/supergate_dhd.mdl

    runOnChat(1)
    interval(100)
    
    #################################################
    # Alex's LastSaid Code do not say you made this ###########
    #Captain Krisus comment: Yay                     #####
    ###########################################################
    
    Owner = owner()
    
    
    if(chatClk( Owner ))
    {
     
    LastSaid = Owner:lastSaid()
       
    }
    
        if( chatClk( Owner ) )
    {
    LastSaid = Owner:lastSaid()
    }


#####First boot
if(first()|duped()){
    Version = "0.4.3"
    Rotation = 1
    hint("Current version is: "+Version+"",5)
}


##Holos
if(LastSaid=="Load planet holo"){
        holoDeleteAll()
        lightRemoveAll()
    timer("1",1000)
}
if(clk("1")){
interval(100)
botSay("Loading Planet Holo")
holoCreate(1)
holoCreate(2)
holoModel(1,"hq_sphere")
holoModel(2,"models/effects/vol_light128x128.mdl")
holoScale(1,vec(2.2,2.2,2.2))
holoScale(2,vec(0.2,0.2,0.4))
holoAng(2,ang(0,0,180))
holoColor(2,vec(0,200,255))
holoMaterial(1,"models/props_wasteland/rockcliff02b")
holoCreate(3)
holoColor(3,vec(0,125,165))
holoModel(3,"hq_sphere")
holoScale(3,vec(2.3,2.3,2.3))
holoAlpha(3,100)
holoRenderFX(1,16)
holoRenderFX(3,16)


##Lighting

lightCreate(1)
lightPos(1,entity():pos()+vec(0,0,20))
lightColor(1,vec(0,15,25))




}

##Rotation

if(LastSaid=="Change holo rotation"){
    timer("3",1000)
}
if(clk("3")){
Rotation = !Rotation
botSay("Changing Holo Rotation")
}
if(Rotation == 1){
    I++
}

holoAng(1,ang(0,I,0))


#Updating

holoPos(3,entity():pos()+vec(0,0,55))
holoPos(2,entity():pos()+vec(0,0,5))
holoPos(1,entity():pos()+vec(0,0,55))

##Holos
if(LastSaid=="Load daedalus holo"){
    holoDeleteAll()
    lightRemoveAll()
    timer("2",1000)
}
if(clk("2")){
botSay("Loading Daedalus Holo")
interval(100)
holoCreate(1)
holoCreate(2)
holoModel(1,"models/Madman07/daedalus/daedalus.mdl")
holoModel(2,"models/effects/vol_light128x128.mdl")
holoScale(1,vec(0.01,0.01,0.01))
holoScale(2,vec(0.2,0.2,0.4))
holoAng(2,ang(0,0,180))
holoColor(2,vec(0,200,255))
holoRenderFX(1,16)
timer("scale1",1000)
}
if(clk("scale1")){
holoScale(1,vec(0.01,0.01,0.01))
}

##Lighting
if(clk("1")){
lightCreate(1)
lightPos(1,entity():pos()+vec(0,0,20))
lightColor(1,vec(0,15,25))
}





if(LastSaid=="Turn off holo"){
    holoDeleteAll()
    lightRemoveAll()
}



####Holos

if(LastSaid=="Load kleiner holo"){
    holoDeleteAll()
    lightRemoveAll()
    timer("4",1000)
}
if(clk("4")){
interval(50)
botSay("Loading Kleiner Holo")
holoCreate(1)
holoCreate(2)
holoModel(1,"models/Kleiner.mdl")
holoModel(2,"models/effects/vol_light128x128.mdl")
holoScale(1,vec(1,1,1))
holoScale(2,vec(0.2,0.2,0.4))
holoAng(2,ang(0,0,180))
holoColor(2,vec(0,200,255))
holoRenderFX(1,16)
timer("scale2",1000)
}
if(clk("scale2")){
holoScale(1,vec(1,1,1))
}

#made by Captain Krisu

####Version 0.4.3###
#    Changelog     #################
# +Hopefully fixed daedalus scaling again#################
##
###
# #####################
# +OPS fixing, thanks to Raptor Jesus for telling ops was over 200#
# #####################################
#-Planet is still piece or rock with atmosphere####
#################################################
