@name GridTest
@inputs 
@outputs Timeout
@persist 
@trigger all

runOnTick(1)

GridSize = 12

Pos = owner():aimPos() 
ClampedPos = round( Pos / GridSize ) * GridSize 


holoCreate(1)
holoModel(1,"models/hunter/blocks/cube025x025x025.mdl")
holoPos(1,ClampedPos + vec(0,0,4))
holoAlpha(1,100)

if(owner():keyAttack2() & Timeout == 0){
Timeout = 1
propSpawn("models/hunter/blocks/cube025x025x025.mdl",holoEntity(1):pos(),ang(0,0,0),1)    
}

if(Timeout){
timer("hold",100)
if(clk("hold")){
Timeout = 0    
}    
}

