FAQ  •  Register  •  Login

DRONES

<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Tue Mar 18, 2014 11:46 pm

DRONES

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
Last edited by tazinator on Thu Mar 20, 2014 4:32 pm, edited 1 time in total.
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002
<<

tazinator

Posts: 352

Joined: Fri Jul 05, 2013 7:35 pm

Post Thu Mar 20, 2014 12:44 am

Re: DRONES

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..
Play my new level! Two different teams fight over a nexus: One mainly defends while the other attacks! is fun
viewtopic.php?f=33&p=21002#p21002

Return to Bots

Who is online

Users browsing this forum: No registered users and 7 guests

cron