@name Robotboy655's Wire Tool: Colorer
@inputs Red Green Blue Alpha Fire MaxRange
@outputs R G B A
@model models/jaanus/wiretool/wiretool_range.mdl

interval(10)

if(first())
{
    holoCreate(0)
    holoScaleUnits(0,vec(1,1,1))
    holoParent(0,entity())
}

Ranger = ranger(MaxRange)
Ranger:entity():setColor(Red,Green,Blue,Alpha)

if(Ranger:distance() != MaxRange)
{
    Range = Ranger:distance()
}
else
{
    Range = MaxRange
}

holoPos(0,entity():pos() + entity():up() * Range)
holoAng(0,entity():angles())

R = Ranger:entity():getColor4():x()
G = Ranger:entity():getColor4():y()
B = Ranger:entity():getColor4():z()
A = Ranger:entity():getColor4():w()
