Page 1 of 1
Add/Remove Players/Bots in-game
Posted: 08 Feb 2012, 10:14
by gajop
I can't seem to find any reference about adding players through lua while in game, so how about adding that?
Personally, I'd use it for my mission/scenario editor, but I can imagine it being useful when someone disconnects, f.e to transfer control temporary to an AI, and then give it back to the player when he reconnects.
I'd be fine if we could at least add AIs and new teams.
Also, while I'm at it, is there a way to modify alliances/teams in game?
Re: Add/Remove Players/Bots in-game
Posted: 08 Feb 2012, 11:03
by SirMaverick
ZK does transfer units from afk/disconnected players to active ones and back when they are back.
You could setup an AI team for each alliance without any units from the beginning and transfer the units there. But I think it's better to transfer the units to another human player than AI.
gajop wrote:Also, while I'm at it, is there a way to modify alliances/teams in game?
Afaik adding/modifying is not possible.
Re: Add/Remove Players/Bots in-game
Posted: 08 Feb 2012, 12:49
by CarRepairer
Unless you count temporary alliances using the /ceasefire command.
Re: Add/Remove Players/Bots in-game
Posted: 09 Feb 2012, 09:20
by Google_Frog
LuaAI is just a gadget so it can control anything. It could take control of a dropped player easily.
Re: Add/Remove Players/Bots in-game
Posted: 28 Feb 2012, 20:16
by abma
trough the autohost interface you can already add players:
https://github.com/spring/spring/commit ... 6f4e2f7c74
do you know:
/aikill
/ailist
/aireload
/aicontrol
?
and when luasockets gets intergrated, you could make a hack-around :-O
i know this was a bit off-topic, as it was requested to add a new player trough lua. (but as the functionality in general seems to be already there, it should't be so hard to add the lua-callin)
Re: Add/Remove Players/Bots in-game
Posted: 28 Feb 2012, 22:39
by gajop
nah, it's great info
Good to know it exists even if it's not callable through lua. Also I didn't know about those commands either. Is there any place where they are documented? It seems like I'm missing a lot of useful stuff hidden there.