FAQ  •  Register  •  Login

ZombieBot

<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Jun 30, 2013 9:08 am

ZombieBot

Yet another bot, the ZombieBot that I made for bobdaduck :)

It starts slow and slowly speeds up. The rate that it speeds up is proportional to the lenght of the level. At 80% of the normal speed, it will start using turbo randomly. It's seriously awesome when you add 15 of them :D

  Code:
--- from S_bot, modified by fordcars
--- this bot works on all game modes, made for bobdaduck

goalPt = point.new(0,0)

prevtarget = nil

gotoPositionWasNil = true
 
o = point.new(0,0)
 
botLoc = nil        -- Bot's location, will be updated when onTick() is run

-- This function gets run once during setup.  It is the only time we can declare variables
-- and have them be defined as globals.
function main()
    botRadius = bot:getRad()
    pathTimerMax = 250
    pathTimer = pathTimerMax
    dirToGo = 0
    game = bf:getGameInfo()

    difficulty         = tonumber(arg[1]) or .5
    agression          = tonumber(arg[2]) or 0.5
    defense            = tonumber(arg[3]) or 0
    speed              = tonumber(arg[4]) or 1
    directionThreshold = tonumber(arg[5]) or .25

    gameType = game:getGameType()
   
    averageIndex = 1
    averageMax = 20

    averageArray = { }
    for i = 1, averageMax do
        averageArray[i] = false
    end

    myOrbitalDirection = 1
    myObjective = math.random(0, 10)

    zombSpeed = 0.1
    useTurbo  = false
    turboTimer = false
    oldBotSpeed = nil

    local totalTime = game:getGameTimeRemaining()

    local percTime = totalTime * 80
    percTime = percTime / 100
    percTime = percTime * 60
    zombieRate = 0.8 / percTime

    addTimer()
end
 

items = { }     -- Global variable, reusable container for findGlobalObjects.  Reusing this table avoids costs of
                -- constructing and destructing it every time we call findGlobalObjects().  Be sure to clear the
                -- table before reusing it!

function addTimer()
    Timer:scheduleRepeating(addBotRate, 16.67)
end

function addBotRate()
    zombSpeed = zombSpeed + zombieRate
end

function shieldSelf()
    table.clear(items)
    bot:findVisibleObjects(items, ObjType.Bullet, ObjType.Seeker, ObjType.Asteroid, ObjType.Mine, ObjType.Burst)

    local distToShieldAt = botRadius * 2 + (1 - difficulty) * 100
    if (items ~= nil) then
        for i,bullet in ipairs(items) do
            local bulletLoc = bullet:getPos()
            local bulletVel = bullet:getVel()
            local angleDiff = math.abs(angleDifference(point.angleTo(o, bulletVel), point.angleTo(bulletLoc, botLoc)))
            local bulletfromteam = false
            --logprint(angleDiff)
            if (game:isTeamGame() == true) and (bullet:getTeamIndex() == bot:getTeamIndex()) then -- If bullet is from team
                bulletfromteam = true                               -- bullet from team is true
            else                                                    -- If it is not a team game or if bullet is not from team
                bulletfromteam = false                              -- bullet from team is false
            end
            if (bulletfromteam == false) then
                if (point.distanceTo(bulletLoc, botLoc) < distToShieldAt + bullet:getRad() + point.distanceTo(o, bulletVel) * 50 and angleDiff < math.pi / 4) or (bullet == ObjType.Burst and point.distSquared(bulletLoc, botLoc) <= 500 * 500) then
                    bot:fireModule(Module.Shield)
                    return(true)
                end
            end
        end
    end
end

function angleDifference(angleA, angleB)
    return (math.mod(math.mod(angleA - angleB, math.pi * 2) + math.pi * 3, math.pi * 2) - math.pi)
end

function fireAtObjects()
    table.clear(items)
    bot:findVisibleObjects(items, ObjType.Robot,               ObjType.Turret, ObjType.Ship, ObjType.Asteroid,
                        ObjType.ForceFieldProjector, ObjType.SpyBug, ObjType.Core)

    -- Cycle through list of potential items until we find one that we can attack
    for index, enemy in ipairs(items) do
        if(fireAtObject(enemy, Weapon.Phaser)) then
            break
        end
    end
end
 
 
-- Fires at the specified object with the specified weapon if the obj is a good target.
-- Does not fire if object is on the same team or if there is something in the way.
-- Returns whether it fired or not.
function fireAtObject(obj, weapon)
    local classId = obj:getObjType()

    if(classId == ObjType.Turret or classId == ObjType.ForceFieldProjector) then
      if(obj:getHealth() < .1) then
          --logprint("He's dead, Jim.")
          return(false)
        end
    end
   
    if(classId == ObjType.Ship    or   classId == ObjType.Robot   or   classId == ObjType.ForceFieldProjector   or
        classId == ObjType.Turret  or   classId == ObjType.Core) then
            if obj:getTeamIndex() == bot:getTeamIndex() and game:isTeamGame() or obj:getTeamIndex() == Team.Neutral then
                --logprint("It's an ally.")
                return(false)
            end
    end

   
    local angle = getFiringSolution(obj)
    if angle ~= nil and bot:hasWeapon(weapon) then
        bot:setAngle(angle + math.rad((math.random()-0.5)*20*(1-difficulty)))
        bot:fireWeapon(weapon)
        --logprint("bot:fireWeapon() called!");
        return(true)
    end
    --logprint("Firing solution not found.");
    return(false)
end
 
 
function getName()
      return("botdazombie")
end


function shield()
    averageArray[averageIndex] = shieldSelf()
    averageIndex = math.mod(averageIndex,averageMax) + 1

    local shieldPercent = 0

    for i = 1, averageMax do
        if(averageArray[averageIndex]) then
            shieldPercent = shieldPercent + 1
        end
    end

    shieldPercent = shieldPercent / averageMax

    if(shieldPercent > directionThreshold) then
        myOrbitalDirection = -myOrbitalDirection
        for i = 1, averageMax do
            averageArray[i] = false
        end
    end
end
 
function orbitPoint(pt, dir, inputDist, inputStrictness)
    local distAway = botRadius * 7
    local strictness = 2
    local direction = 1

    if(dir ~= nil) then
        direction = dir
    end


    if(inputDist ~= nil) then
        distAway = inputDist
    end

    if(inputStrictness ~= nil) then
        strictness = inputStrictness
    end

    if(pt ~= nil) then
        local dist = point.distanceTo(pt, botLoc)
        local deltaDistance = (dist - distAway) * strictness / distAway
        local sign = 1
        if(deltaDistance > 0) then
            sign = 1
        elseif(deltaDistance < 0) then
            sign = -1
        end

        local changeInAngle = (math.abs(deltaDistance)/(deltaDistance + sign)) * math.pi/2
        local angleToPoint = point.angleTo(pt, bot:getPos())
        dirToGo = angleToPoint + (math.pi/2 + changeInAngle)*direction
        --bot:setThrust(speed, dirToGo)
    end
end

function gotoPosition(pt)
    if pt ~= nil then
        gotoPositionWasNil = false
        if pathTimer < .01 then
            goalPt = bot:getWaypoint(pt)
            if(goalPt ~= nil) then
                dirToGo = point.angleTo(botLoc, goalPt)
            end
        end
    end
end

function gotoAndOrbitPosition(pt)
    if pt ~= nil then
        gotoPositionWasNil = false
        if pt~= nil then
            gotoPositionWasNil = false
            gotoPosition(pt)
        else
            gotoPositionWasNil = false
            orbitPoint(pt, myOrbitalDirection, botRadius * 5, 2)
        end
    end
end
 
-- Returns true if it found an enemy to fight
function attackNearbyEnemies(target, agressionLevel)
    if target ~= nil then
        local targetLoc = target:getPos()
     
        -- local dist    = point.distanceTo(botLoc, targetLoc)
        local myPow   = bot:getEnergy() + bot:getHealth()

        table.clear(items)
        bot:findVisibleObjects(items, ObjType.Ship, ObjType.Robot)
     
        local otherPow = target:getEnergy() + target:getHealth() * #items
     
        --advantage is between -1 and 1, -1 meaning an extreme disadvantage and 1 meaning an extreme advantage
        local advantage = (myPow - otherPow) / math.max(myPow, otherPow)
        if(advantage  / 2 + .5  >agressionLevel) then
            --orbitPoint(targetLoc, myOrbitalDirection, botRadius * 9, 2)
            prevtarget = targetLoc
            return(false)      -- was true
        else
        end
    end
    return(false)
end


-- Returns the objective for the bot, in the form of an object the bot can navigate towards.  This makes bots choose different defending locations.
-- If onTeam is true, will only return items on specified team.  If onTeam is false, will return items *not* on
-- specified team.  If called with fewer than three args, will ignore team altogether.
function getObjective(objType, team, onTeam)

    table.clear(items)
    bf:findAllObjects(items, objType)       -- Returns a list of all items of type objType in the game

    local itemsOnMyTeam = {}
    local currentIndex = 1

    for index, item in ipairs(items) do         -- Iterate through all found items
        local itemTeamIndex = item:getTeamIndex()

        if (objType == ObjType.Flag) and (gameType == GameType.Nexus) then
            if not item:isOnShip() then
                itemsOnMyTeam[currentIndex] = item
                currentIndex = currentIndex + 1
            end
        elseif (objType == ObjType.Flag) and
                ((gameType == GameType.HTF) or (gameType == GameType.Retrieve)) and
                item:isInCaptureZone() then
                --logprint(item:getCaptureZone():getTeamIndex());
            if item:getCaptureZone():getTeamIndex() ~= bot:getTeamIndex() then
                itemsOnMyTeam[currentIndex] = item
                currentIndex = currentIndex + 1
            end
        elseif (objType == ObjType.GoalZone) and (gameType == GameType.HTF or gameType == GameType.Retrieve) then
            if onTeam == nil or ((itemTeamIndex == team) == onTeam) then
                if not item:hasFlag() then
                    itemsOnMyTeam[currentIndex] = item
                    currentIndex = currentIndex + 1
                end
            end
        else
            if (itemTeamIndex == Team.Neutral ) and (objType ~= ObjType.GoalZone or gameType ~= GameType.ZC) then
                itemTeamIndex = team   -- anything Neutral is on our team (except zone control neutral goal zone)
            end
            if onTeam == nil or ((itemTeamIndex == team) == onTeam) then
                itemsOnMyTeam[currentIndex] = item
                currentIndex = currentIndex + 1
            end
        end
    end
    local listMax = 0
    --find max
    if itemsOnMyTeam[1] ~= nil then
        for index,item in ipairs(itemsOnMyTeam) do
            if(item ~= nil) then
                listMax = listMax + 1
            end
        end
        local targetNum = math.mod(myObjective, listMax) + 1
        return(itemsOnMyTeam[targetNum])
    else
        return(nil)
    end

--  local closestitem = 0 --itemsOnMyTeam[1]
--  local cur = 1
--  local closestdist = 99999999
--  while itemsOnMyTeam[cur] ~= nil do
--      local item1 = itemsOnMyTeam[cur]
--      if item1 ~= nil then
--          local loc = item1.getPos()
--          if loc ~= nil then
--              local dist = point.distanceTo(botLoc, loc)
--              if dist < closestdist then
--                  closestdist = dist
--                  closesetitem = item1
--              end
--          end
--      end
--      cur=cur+1
--  end
--  return(closestitem)
end


function doObjective(closestEnemy)
    gotoPositionWasNil = true
    if(gameType == GameType.Bitmatch) then
        --Nothing to do here.          
    elseif(gameType == GameType.Nexus) then
        -- Grab any flags that are found, and go to nexus when it opens
        local otherFlag = getObjective(ObjType.Flag)            -- Find any flags
        if otherFlag ~= nil then gotoPosition(otherFlag:getPos()) end
        -- logprint(bot:getFlagCount())  -- always 1
        if bot:getFlagCount() > 3 and (game:isNexusOpen() or game:getNexusTimeLeft() < 10000) then  --  Need to know if nexus is open
            local nexusOrFlag = getObjective(ObjType.Nexus)  -- unimplemented push function error.
            if nexusOrFlag ~= nil then
                gotoPosition(nexusOrFlag:getPos())
            end
        end
    elseif(gameType == GameType.Rabbit) then
        --Grab a flag, or go after the flag.            
        if not bot:hasFlag() then
            local otherFlag = getObjective(ObjType.Flag, bot:getTeamIndex(), true)       -- Find flags on our team
            gotoPosition(otherFlag:getPos())
        end
    elseif(gameType == GameType.HTF or gameType == GameType.Retrieve) then
        -- Grab the flag and put it into goal zones
        -- Robot keeps trying to pick up the flags that is already in the goalZones
        if bot:hasFlag() then
            local otherFlag = getObjective(ObjType.GoalZone, bot:getTeamIndex(), true)   -- Find GoalZone on our team
            if otherFlag ~= nil then
                gotoPosition(otherFlag:getPos())
            end
        else
            local otherFlag = getObjective(ObjType.Flag, bot:getTeamIndex(), true)       -- Find flags on our team
            if otherFlag ~= nil then
                gotoPosition(otherFlag:getPos())
            end
        end
    elseif(gameType == GameType.CTF) then
        --defend the flag
        local myFlag    = getObjective(ObjType.Flag, bot:getTeamIndex(), true)    -- Find flags on our team
        local otherFlag = getObjective(ObjType.Flag, bot:getTeamIndex(), false)   -- Find flags not on our team

        if(defense < .5) then
            if bot:hasFlag() then
                if not myFlag:isOnShip() then
                    gotoPosition(myFlag:getPos())
                else
                    gotoAndOrbitPosition(myFlag:getPos())
                end
                --gotoPosition(myFlag:getPos())
            elseif(otherFlag ~= nil) then
                if myFlag:isOnShip() then
                    gotoPosition(myFlag:getPos())
                elseif not otherFlag:isOnShip() then
                    gotoPosition(otherFlag:getPos())
                else
                    gotoAndOrbitPosition(otherFlag:getPos())
                end
            end
        else
            if bot:hasFlag() then
                gotoPosition(myFlag:getPos())
            elseif myFlag:isInInitLoc() then
                gotoAndOrbitPosition(myFlag:getPos())
            else
                if myFlag:isOnShip() then
                    gotoAndOrbitPosition(myFlag:getPos())
                else
                    gotoPosition(myFlag:getPos())
                end
            end
        end
    elseif(gameType == GameType.Soccer) then
        --grab soccer and put into enemy goal
        -- How do we know if we are holding soccer ? (not supported when cannot pickup soccer (016)
        if bot:getMountedItems(ObjType.SoccerBallItem)[1] ~= nil then
            local otherFlag = getObjective(ObjType.GoalZone, bot:getTeamIndex(), false)   -- Find GoalZones not on our team
            if otherFlag ~= nil then
                gotoPosition(otherFlag:getPos())
            end          
        else
            local otherFlag = getObjective(ObjType.SoccerBallItem)                        -- Find SoccerBall
            if otherFlag ~= nil then
                gotoPosition(otherFlag:getPos())
            end
        end
    elseif(gameType == GameType.ZC) then
        -- Grab flag, then go after zones that is not ours.
        if not bot:hasFlag() then
            local otherFlag = getObjective(ObjType.Flag, bot:getTeamIndex(), true)           -- Find flags on our team
            if otherFlag ~= nil then
                if otherFlag:isOnShip() then
                    gotoAndOrbitPosition(otherFlag:getPos())
                else
                    gotoPosition(otherFlag:getPos())
                end
            end
        else
            local otherFlag = getObjective(ObjType.GoalZone, bot:getTeamIndex(), false)      -- Find GoalZones on our team
            if otherFlag then
                gotoPosition(otherFlag:getPos())
            end
        end

    elseif(gameType == GameType.Core) then
        local obj = getObjective(ObjType.Core, bot:getTeamIndex(), false)                    -- Find enemy Core
        if obj ~= nil then
            gotoAndOrbitPosition(obj:getPos())
        end
    end

    -- If we have no where to go, go to nearest enemy.
    if gotoPositionWasNil then
        if(closestEnemy ~= nil) then
            prevtarget = closestEnemy:getPos()
        end
        if(prevtarget ~= nil) then
            gotoAndOrbitPosition(prevtarget)
        end
    end
end


function goInDirection()
    bot:setThrust(zombSpeed, dirToGo)
end

function turbo()
    useTurbo = true
    oldBotSpeed = zombSpeed
    zombSpeed = 1

    local turboLength = math.random(2000, 6000)
    Timer:scheduleOnce(stopTurbo, turboLength)
end

function stopTurbo()
    useTurbo = false
    turboTimer = false
    zombSpeed = oldBotSpeed
end

-- This function gets called every game tick; deltaTime is the time that has elapsed since it was last called
function onTick(deltaTime)
    botLoc = bot:getPos()
    pathTimer = pathTimer - deltaTime
    assert(bot:getPos() ~= nil)

    local closestEnemy = bot:findClosestEnemy()
   
    -- attackNearbyEnemies returns true if there is an enemy to fight, false if the bot can do something else
    attackNearbyEnemies(closestEnemy, 1 - agression)
    doObjective(closestEnemy)   -- Set bot's objective

    goInDirection()             -- Move the ship
    fireAtObjects()             -- Fire weapons
    shield()                    -- Apply shield

    if(pathTimer < 0) then
        pathTimer = pathTimerMax + math.random(0, pathTimerMax)
    end

    if (turboTimer == false) and (zombSpeed >= 0.8) then --------------------
        local timerTime = math.random(20000, 30000)
        turboTimer = true
        Timer:scheduleOnce(turbo, timerTime)
    end

    if (useTurbo == true) then
        bot:fireModule(Module.Turbo)
    end
end
Last edited by Fordcars on Mon Apr 07, 2014 7:42 am, edited 9 times in total.
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Sun Jun 30, 2013 9:09 am

Re: ZombieBot

THANK YOU :zapdance:
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Jun 30, 2013 9:27 am

Re: ZombieBot

YOU'RE WELCOME :zapdance:
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Quartz

User avatar

Posts: 901

Joined: Thu Jun 17, 2010 12:14 am

Location: Texas

Post Sun Jun 30, 2013 9:47 am

Re: ZombieBot

Great job! :)
Exploits of Quartz and bobdaduck - Pleiades Maps
19-year-old Quartz mad about lawn removal
raptor wrote:sometimes I think getting Quartz to use plugins is like getting my mom to use a computer
<<

CamperKiller39

Posts: 16

Joined: Fri Apr 19, 2013 8:39 pm

Post Tue Jul 30, 2013 5:38 pm

Re: ZombieBot

Ha ha ha, these things are fun. :D
<<

Santiago ZAP

User avatar

Posts: 317

Joined: Sat May 14, 2011 8:05 am

Post Wed Sep 04, 2013 8:53 am

Re: ZombieBot

AWESOME JOB
Would be epic if they like, changed teams when killed by another zombiebot
:zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance: :zapdance:
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Wed Sep 04, 2013 12:47 pm

Re: ZombieBot

Hehe thanks :D

Yeah, maybe with levelgens eventually :P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Zapgamer

User avatar

Posts: 43

Joined: Thu Nov 25, 2010 8:54 pm

Post Sun Dec 22, 2013 2:21 pm

Re: ZombieBot

Fix it please, 19 update broke it.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Dec 22, 2013 8:57 pm

Re: ZombieBot

Fine ;) I'll try to 019 it
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Dec 22, 2013 9:23 pm

Re: ZombieBot

Done!
If you have any suggestions or problems, tell me!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Mon Dec 23, 2013 12:16 am

Re: ZombieBot

It doesn't work for me. When I try to add it, it just leaves immediately.
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Mon Dec 23, 2013 3:12 pm

Re: ZombieBot

Really? Not for me...
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Mon Dec 23, 2013 3:14 pm

Re: ZombieBot

Oh it crashes on certain Gametypes

Edit: Oh hahaha: robot_helper_functions.lua bug, nice

Edit: DISREGUARD! By the way, if any guys want to convert their code to 019 fast, this website is really useful:http://textmechanic.com/Find-and-Replace-Text.html
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Mon Dec 23, 2013 9:43 pm

Re: ZombieBot

Sorry guys, there is a lua bug, probably Bitfighter's problem. It is telling me there is an "=" missing where there isn't :? I'll work on it. Oh and Skybax, I'll try to get your bot working too ;)
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Tue Dec 24, 2013 12:19 pm

Re: ZombieBot

Hi,

Yes it was an error in robot_helper_functions.lua: 'bot:findAllObjects' should have been 'bf:findAllObjects'.

However... Please look at your console when running the bot - you'll get deprecation warnings. These are meant to scream at you to update your code. Updating the code to 019 API does fix this bot.

I recommend making the bot use 'bf:findAllObjects' as well as solving all the other warnings.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 24, 2013 1:19 pm

Re: ZombieBot

Hi, I did all the changes to stop the screaming, but I still get an '=' missing and I have no idea why. Here is the code: http://pastie.org/8574175

I think this may be a stupid thing that I did though :P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 24, 2013 2:44 pm

Re: ZombieBot

Raptor, I am lost. I did all the changes I should of I think, my log is clean apart from the '='
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Tue Dec 24, 2013 3:02 pm

Re: ZombieBot

Sorry, I'll explain better:

If you change the one instance of bot:findGlobalObjects to bf:findAllObjects, that will fix the bot. Then, take a look at your log as you run the bot, it will be screaming at you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 24, 2013 3:35 pm

Re: ZombieBot

Ahh thanks, but I think I messed up somewhere, I still get the freaking = in http://pastie.org/8574175

Here is the log: http://pastie.org/8574359
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Tue Dec 24, 2013 3:41 pm

Re: ZombieBot

That's weird - it looks like you made changes from the code that is posted in the first post. You should probably copy/paste from what you posted...
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 24, 2013 3:47 pm

Re: ZombieBot

I know, sorry :P But I didn't even touch that part, and that line is 'local bulletFromTeam = false' so, no error syntax. I'll update my first post
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Tue Dec 24, 2013 4:38 pm

Re: ZombieBot

Finally works!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Thu Jan 02, 2014 1:09 pm

Re: ZombieBot

What determines how fast the zombie goes? Cause it seems like it speeds up really fast and then can go even faster than a player lol
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Thu Jan 02, 2014 2:21 pm

Re: ZombieBot

Hehe, it is proportionate to the length of the level, and then at some point it starts to use boost :)

Edit: Oh wait, raptor tells me there is a client prediction bug

Edit: We have no idea what is going on
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Thu Jan 02, 2014 4:20 pm

Re: ZombieBot

Fordcars wrote:Hehe, it is proportionate to the length of the level, and then at some point it starts to use boost :)

Edit: Oh wait, raptor tells me there is a client prediction bug

Edit: We have no idea what is going on

That made me laugh out loud.
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Zapgamer

User avatar

Posts: 43

Joined: Thu Nov 25, 2010 8:54 pm

Post Fri Jan 10, 2014 1:17 pm

Re: ZombieBot

Some of the bots don't work and will keep heading right toward a wall. It doesn't shoot or move anywhere's else.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Fri Jan 10, 2014 5:32 pm

Re: ZombieBot

Yeah, there seems to be a problem with some stuff, but that looks more like an s_bot problem :P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Wed Jan 15, 2014 12:40 pm

Re: ZombieBot

Hmm wonder what would happen if you made s_bot 1.25x faster then a normal ship...
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Wed Jan 15, 2014 3:46 pm

Re: ZombieBot

Me and raptor tried it, It may jitter a tiny bit more, but Bitfighter will never let bots or ships go faster than 1 :P
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Wed Jan 15, 2014 8:14 pm

Re: ZombieBot

a shame wish there was a way to get robots to go faster then normal ships maybe adjust the max sped value for bots......
Bitfighter Forever.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Wed Jan 15, 2014 10:31 pm

Re: ZombieBot

I swear ZombieBot goes faster than me when it's angry.
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Thu Jan 16, 2014 6:56 pm

Re: ZombieBot

Yeah, well, I can't control bot's will, I guess you will have them haunt you, for the rest of your life...
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Fri Jan 17, 2014 9:58 pm

Re: ZombieBot

Is it possible to make a bot that always uses turbo + phaser and the energy requirement for the turbo is 0? then maybe you can have a faster bot.....
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sat Jan 18, 2014 12:35 am

Re: ZombieBot

Sadly, no, since bot's are pretty much players, so no cheating :( You would need a levelgen
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Wed Jan 22, 2014 5:03 pm

Re: ZombieBot

ok use a lev gen then :)
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Mon Jan 27, 2014 8:18 pm

Re: ZombieBot

Problem resolved!!!!! The bot speeds faster than normally because of the timer bug in 019, it is repaired in 019a, happy zombieing!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Fri Jan 31, 2014 2:36 pm

Re: ZombieBot

So bots are faster then players now?
Bitfighter Forever.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Fri Jan 31, 2014 2:38 pm

Re: ZombieBot

They are right now, but won't be in the next release.
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Fri Jan 31, 2014 2:47 pm

Re: ZombieBot

better find a way to fix it in next release
Bitfighter Forever.
<<

Skybax

User avatar

Posts: 1035

Joined: Thu Mar 11, 2010 9:17 am

Location: Washington

Post Fri Jan 31, 2014 3:29 pm

Re: ZombieBot

It already is...
raptor wrote:Sorry Skybax, I hijacked your signature so I could post lots of info.
Whittling While wrote:Does this mean I finally get quoted in someone's signature?
watusimoto wrote:Who are the devs around here?!?
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Fri Jan 31, 2014 3:39 pm

Re: ZombieBot

Yep :zapdance:
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Sat Feb 01, 2014 1:07 pm

Re: ZombieBot

Skybax wrote:They are right now, but won't be in the next release.


is there a limit to how much faster the bot can go i would like to see a x3 speed robot......
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Sun Feb 02, 2014 12:49 pm

Re: ZombieBot

Yeah, bots can't go faster than normal players, sorry!
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Mon Feb 17, 2014 7:08 pm

Re: ZombieBot

there's a way around everything in programming XD

maybe a level gen ?
Bitfighter Forever.
<<

Fordcars

User avatar

Posts: 1016

Joined: Fri Apr 20, 2012 3:51 pm

Location: Some city, somewhere

Post Mon Feb 17, 2014 7:12 pm

Re: ZombieBot

Yeah, but client side prediction would poop on you allot :/
skybax: Why is this health pack following me?
bobdaduck: uh, it likes you.
<<

amgine

Posts: 1399

Joined: Thu Apr 19, 2012 2:57 pm

Post Mon Feb 17, 2014 7:15 pm

Re: ZombieBot

I think i have a idea what about a invinisble mini speed zone that will always follow the bot around and he will be on top of it.....
Bitfighter Forever.

Return to Bots

Who is online

Users browsing this forum: No registered users and 14 guests