@name holo fish 
@inputs 
@outputs
@persist D F
@trigger 

interval(10)

Amount = 20
Speed = 1
Scale = vec(1,1,1)
ZOffest = 5
AngForce = 10

while(F < Amount)
{
    holoCreate(F)
    holoModel(F,"models/Humans/Group03/male_07.mdl")
    holoAng(F,ang(0,random(-180,180),0))
    holoScale(F,Scale)
    holoPos(F,holoEntity(F):pos() + vec(0,0,ZOffest))
    holoAnim(F,2)
    F++
}

while(D < Amount)
{
    Ent = holoEntity(D)
    R = rangerOffset(Ent:pos(),Ent:pos() + Ent:forward() * 100)
    if(R:distance() > 20)
    {
        holoAng(D,Ent:angles() + ang(0,random(-AngForce,AngForce),0))
    }
    else
    {
        holoAng(D,Ent:angles() + ang(0,-90,0))
    }
    holoPos(D,Ent:pos() + Ent:forward() * Speed)
    D++
}
D = 0



