You are not logged in.
Pages: 1
Offline
Offline
Offline
I think it is not possible todo that with mapconfigs. As far as I know the mapconfig is executed on start of warmup, and then again on start of map.
Unless I missed something , I think thats only possible with lua.
edit: it might be possible todo some fancy mapscript, I think there was a way to detect warmup. But if its then possible to send a command to omnibot from the mapscript - that I doubt.
Last edited by ailmanki (05-Jun-13 06:00:25)
Offline
Put this in a lua file for example: bot.lua
Then check in server.cfg for lua_modules and change the value: set lua_modules "bot.lua"
--change this value to change bot behavier
botbehavier = 3
-- 1: bot amount depends on match status (warmup, running)
-- 2: bot amount depends on map
-- 3: both (1+2 behavier)
--enter your mapnames and bot value here
--(format must be the same as the example!)
map_table = {
{ mapname = "adlernest", botamount = "1", },
{ mapname = "radar", botamount = "2", },
{ mapname = "oasis", botamount = "7", },
{ mapname = "et_ice", botamount = "8", },
}
--amount of bots playing while on warmup (botbehavier 1 or 3)
warmupbots = 6
--------------------------------------------END OF CONFIG--------------------------------------------------------
function et_InitGame(leveltime, randomseed, restart)
gamestate = tonumber(et.trap_Cvar_Get( "gamestate" ))
mapnames = et.trap_Cvar_Get( "mapname" )
--Game status bot amount
--gamestate: 0 game running, 1 all players ready, 2 warmup, 3 intermission
if gamestate == 0 then
if botbehavier == 1 or botbehavier == 3 then
et.trap_SendConsoleCommand( et.EXEC_APPEND, "bot maxbots 0\n" )
et.trap_SendConsoleCommand( et.EXEC_APPEND, "bot kickall\n" )
end
elseif gamestate == 2 then
if botbehavier == 1 or botbehavier == 3 then
et.trap_SendConsoleCommand( et.EXEC_APPEND, "bot maxbots "..warmupbots.."\n" )
end
end
--Map bot amount
for _, line in ipairs(map_table) do
if mapnames == line.mapname then
local botamount = line.botamount
if botbehavier == 2 or (botbehavier == 3 and gamestate == 2) then
et.trap_SendConsoleCommand( et.EXEC_APPEND, "bot maxbots "..botamount.."\n" )
end
end
end
end
Last edited by Micha (05-Jun-13 22:38:01)
Made Hide&Seek mod: http://forums.warchest.com/showthread.p … -Seek-pack
Creator of Infected Mod: http://forums.warchest.com/showthread.p … d-Infected
Offline
Offline
Pages: 1