FAQ  •  Register  •  Login

clones

<<

scottgeng00

User avatar

Posts: 2

Joined: Sun Jul 31, 2011 2:02 pm

Location: In Your Face.

Post Tue Aug 16, 2011 11:20 am

clones

How do you make more than one clone at a time?
Bitfighter!!! :P
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Tue Aug 16, 2011 8:39 pm

Re: clones

Hi,

And welcome to the forums!

I believe adding multiple bots at once is a server admin feature only at the moment - using the '/addbots' command. sam686 knows more about it than I.
<<

scottgeng00

User avatar

Posts: 2

Joined: Sun Jul 31, 2011 2:02 pm

Location: In Your Face.

Post Wed Aug 17, 2011 7:39 am

Re: clones

Thanks! what about clones?
Bitfighter!!! :P
<<

raptor

Posts: 1046

Joined: Mon Oct 11, 2010 9:03 pm

Post Wed Aug 17, 2011 9:25 am

Re: clones

I may be misunderstanding, but if you are talking about the clone.bot, then that follows the same rules as any robot.
<<

sam686

User avatar

Posts: 468

Joined: Fri Oct 15, 2010 8:53 pm

Location: United States, South Dakota

Post Wed Aug 17, 2011 9:38 am

Re: clones

As for adding clonebot, try /addbot 0 clone sam686
Add multiple bots have an extra number. /addbots 10 0 clone sam686
To clone yourself, put in your player name instead of my name. If your name have spaces in it, put a quote around it like "name have spaces".
For first parameter of addbot, that 0 is first team, 1 is second team.

here is the code to clone bot:
  Code:

clonename = ""

foundship = nil

function main()
  foundship = nil
  clonename = arg[1]
  bot:subscribe(PlayerLeftEvent)
end

function getName()
 return("clone_bot")
end

function onPlayerLeft(playerinfo_who_left)
  foundship = nil
end

function onTick()
  if foundship == nil then

    local items = bot:findGlobalItems(ShipType)
    for ind, it in ipairs(items) do
     if it:getPlayerInfo():getName() == clonename then
      foundship = it:getPlayerInfo()
     end
    end

  else
    local ship = foundship:getShip()
    bot:setWeapon(ship:getActiveWeapon())
    bot:setReqLoadout(ship:getReqLoadout())
    bot:copyMoveFromObject(ShipType, ship)
  end
end

This bot will not work on a release version of 015a and older, you may need to wait for next version or compile my version yourself. For now, clone bot only runs of my server and a few others.

(edited, no longer a link to clone.bot file)

Return to Bots

Who is online

Users browsing this forum: No registered users and 2 guests

cron