Page 1 of 1

DRONES

PostPosted: Tue Mar 18, 2014 11:46 pm
by tazinator
DRONE


  Code:
---------DRONE
---------work of Thomas of Hilo, pseudonym tazinator
---------based on Trollbot by fordcars
---------follows PLAYER ships only!
---------change ship to core if you want to play Mothership :)
items = { }

function getName() -- Called once
    return("Drone")
end

function main() -- This is the first code ran, after loose code
    targetShip = nil
    speed = .8
end


function onTick()
    table.clear(items)
    targetShip = findClosest(findAllObjects(items, ObjType.Ship))

    if(targetShip ~= nil) then
        local targetShiploc = targetShip:getLoc()
    local angle = targetShip:getAngle()
    if(bot:canSeePoint(targetShiploc)) then
          bot:setThrust(0.6, targetShiploc ) --moves .8 speed toward point
          bot:setAngle(angle)
      bot:fireWeapon(Weapon.Phaser)
      else
          bot:setAngle(angle)
      bot:fireWeapon(Weapon.Phaser)
    end
    end
end

 


IT'S ALIVE!11!!!!12@#!21

Re: DRONES

PostPosted: Thu Mar 20, 2014 12:44 am
by tazinator
It's technically playable on maps now!
Only thing I want to REALLY fix is the annoying grating noise when ships are driving into you.


Tip: Play the stock maps with these. It adds a whole new element to the game..