@name 
@persist NmBots GoDst Sca
interval(500)#Delay between moves, 250 works well. To high and they will not form a grid.

if(first())
{
    entity():setAlpha(255)
NmBots = 75#Number of Bots. I've gone up to 725, but that was with unlimited E2 and increased max holos. Also keep in mind they'll overlap/take the same path for a while.
GoDst = 100#Distance each bot will move
Sca = 1

for(I=1,NmBots)
{
#Col = vec(random(0,255),random(0,255),random(0,255)) #Crayola Colored Crayon pack mode
Col = vec(0,0,255) #Standard Red mode.
#Col = vec(I*I,0,0) #Red Gradient mode.
T = "trails/smoke" #Thicker and more visible.
#T = "trails/laser"  #Thinner and less visible, looks nicer.
holoCreate(I,entity():pos()+vec(0,0,10),vec(Sca,Sca,Sca),ang(0,0,0),Col)#If I had a dollar for every time somebody DIDN'T put holo create in if(first()), and was creating holos every tick. :|
holoEntity(I):setTrails(Sca*15,Sca*15,25,T,Col,255)
}}

for(I=1,NmBots)
{
    Dir = randint(1,6)
    # 1 2 3 4 Control Cardinal Directions
    # 5 6 Control Z
    # 7 8 9 10 Control Diagonals
    # 11 Controls No Move (also prints out a message, can get annoying if you have many 'bots' moving.)
    
        if(Dir == 1 & (holoEntity(I):pos() + vec(GoDst,0,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(GoDst,0,0))}
    elseif(Dir == 2 & (holoEntity(I):pos() + vec(-GoDst,0,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(-GoDst,0,0))}
    elseif(Dir == 3 & (holoEntity(I):pos() + vec(0,GoDst,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(0,GoDst,0))}
    elseif(Dir == 4 & (holoEntity(I):pos() + vec(0,-GoDst,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(0,-GoDst,0))}
    elseif(Dir == 5 & (holoEntity(I):pos() + vec(0,0,GoDst)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(0,0,GoDst))}
    elseif(Dir == 6 & (holoEntity(I):pos() + vec(0,0,-GoDst)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(0,0,-GoDst))}
    elseif(Dir == 7 & (holoEntity(I):pos() + vec(-GoDst,GoDst,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(-GoDst,GoDst,0))}
    elseif(Dir == 8 & (holoEntity(I):pos() + vec(GoDst,GoDst,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(GoDst,GoDst,0))}
    elseif(Dir == 9 & (holoEntity(I):pos() + vec(-GoDst,-GoDst,0)):isInWorld()){holoPos(I,holoEntity(I):pos() + vec(-GoDst,-GoDst,0))}
    elseif(Dir == 10 & (holoEntity(I):pos() + vec(GoDst,-GoDst,0):isInWorld())){holoPos(I,holoEntity(I):pos() + vec(GoDst,-GoDst,0))}
    #elseif(Dir == 11){print("I Don't want to move.")}#No Change (Will spam if you have a lot of moving 'bots'
    #elseif(Dir == 11){} #This will not spam.
}
