@name Hats @persist Ind Pn SP:array Count HE:entity HAR:array HN #------------------------------# # DGROUSE - 9/01/14 # #------------------------------# if( first() ){ timer("wait",1000) } if(clk("wait") && Pn <= players():count() ) { Pn++ HN++ Ply = players()[Pn,entity] #Ply = owner() Ind++ holoCreate(Ind) holoPos(Ind, Ply:attachmentPos("eyes")) holoAng(Ind, Ply:attachmentAng("eyes")) holoParentAttachment(Ind, Ply, "eyes") holoAlpha(Ind,0) holoVisible( Ind, Ply, 0 ) HE = holoEntity(Ind) HI = Ind HEA = HE:angles() function part(Pos:vector,Scale:vector,Color:vector,Ang:angle,Model:string){ Ind++ holoCreate(Ind) holoPos(Ind, HE:toWorld(Pos)) holoAng(Ind, HE:toWorld(Ang)) holoModel(Ind,Model) holoScale(Ind, Scale ) #holoScale(Ind, vec(sqrt(Scale:x()),sqrt(Scale:y()),sqrt(Scale:z())) ) holoColor(Ind,Color) holoParent(Ind,HI) holoVisible( Ind, Ply, 0 ) } function cH(Num:number){ if( Num == 1 ){ # WONKA HAT part(vec(-3,0,4),vec(1,1,0.05),vec(60,0,150),ang(),"hqcylinder") part(vec(-3,0,5),vec(0.7,0.7,0.2),vec(150,0,255),ang(),"hqcylinder") part(vec(-3,0,10.35),vec(0.7,0.7,0.7),vec(60,0,150),ang(),"hqcylinder") } if( Num == 2 ){ # TOP HAT part(vec(-3,0,4),vec(1,1,0.05),vec(),ang(),"hqcylinder") part(vec(-3,0,5),vec(0.7,0.7,0.2),vec(150,150,150),ang(),"hqcylinder") part(vec(-3,0,10.35),vec(0.7,0.7,0.7),vec(),ang(),"hqcylinder") } if( Num == 3 ){ # BUCKET HAT part(vec(-3,0,0),vec(1,1,1),vec(50,50,80),ang(),"hq_hdome") part(vec(-3,0,0),vec(1,0.7,1),vec(20,20,30),ang(90,0,0),"hq_torus_thin") part(vec(3,0,5),vec(0.3,0.3,0.5),vec(255,255,30),ang(45,0,0),"hq_cone") part(vec(0,0,6.5),vec(0.2,0.2,0.3),vec(255,255,30),ang(20,0,0),"hq_cone") part(vec(-3,0,7),vec(0.15,0.15,0.25),vec(255,255,30),ang(),"hq_cone") part(vec(-6,0,6.5),vec(0.1,0.1,0.20),vec(255,255,30),ang(-20,0,0),"hq_cone") part(vec(2,3,2),vec(0.3,0.3,0.1),vec(255,255,255),ang(90,0,0),"hq_sphere") part(vec(2,-3,2),vec(0.3,0.3,0.1),vec(255,255,255),ang(90,0,0),"hq_sphere") part(vec(2.5,3,2),vec(0.1,0.1,0.05),vec(),ang(90,0,0),"hq_sphere") part(vec(2.5,-3,2),vec(0.1,0.1,0.05),vec(),ang(90,0,0),"hq_sphere") part(vec(2,3,3),vec(0.2,0.5,0.3),vec(50,50,80),ang(0,0,30),"hq_dome") part(vec(2,-3,3),vec(0.2,0.5,0.3),vec(50,50,80),ang(0,0,-30),"hq_dome") } if( Num == 4 ){ # HALO part(vec(-3,0,6),vec(1,1,0.2),vec(255,255,255),ang(),"hq_torus_thick") holoAlpha(Ind,100) part(vec(-3,0,6),vec(0.8,0.8,0.2),vec(255,255,255),ang(),"hq_torus") } if( Num == 5 ){ # PLANET part(vec(-3,0,2),vec(1.3,1.3,1.3),vec(255,255,255),ang(),"hq_sphere") holoMaterial(Ind,"models/props_combine/prtl_sky_sheet") part(vec(-3,0,2),vec(1.4,1.4,1.4),vec(255,255,255),ang(),"hq_sphere") holoMaterial(Ind,"models/props/cs_office/clouds") part(vec(9,0,3),vec(0.2,0.2,0.2),vec(255,255,255),ang(),"hq_sphere") holoMaterial(Ind,"models/props_wasteland/rockcliff02c") SP:pushNumber(Ind) HAR:pushEntity(HE) } if( Num == 6 ){ # WIDE BRIM part(vec(-3,0,2),vec(0.9,0.9,0.9),vec(),ang(),"hq_dome") part(vec(-3,0,2),vec(0.9,0.9,0.1),vec(90,90,90),ang(),"hq_cylinder") part(vec(-3,0,1.4),vec(2,2,0.04),vec(),ang(),"hq_cylinder") } } if( HN > 6 ){ HN = 1 } cH(HN) timer("wait",1000) } timer("Special",10) if(clk("Special")) { Count=Count+5 for(I=1,SP:count()){ holoPos(SP[I,number], HAR[I,entity]:toWorld(vec( sin(Count)*15-3 , cos(Count)*12,3 ))) } }