clones
5 posts
• Page 1 of 1
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.
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.
Re: clones
I may be misunderstanding, but if you are talking about the clone.bot, then that follows the same rules as any robot.
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:
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)
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)
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest