Troll Bot
I was bored so I made this bot, it follows the closest person and shoots bursts at them, useful for trolling when you add 40 of them
- Code:
- ---------TROLLBOT
---------by fordcars
items = { }
function getName() -- Called once
return("tROLL bOT")
end
function main() -- This is the first code ran, after loose code
targetShip = nil
end
function onTick()
table.clear(items)
targetShip = findClosest(findAllObjects(items, ObjType.Ship))
if(targetShip ~= nil) then
local targetShiploc = targetShip:getLoc()
bot:setThrustToPt( targetShiploc )
bot:setAngle(targetShiploc)
bot:fireWeapon(Weapon.Burst)
end
end
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.