Page 1 of 1

Changing alliances while fighting

PostPosted: 09 Oct 2015, 10:42
by The Dark Lord
Hey,
I'm not sure if it's a bug or not (I consider it as one :P), but soldiers keep fighting when I make them allied. I wanted to use this script to stop a 1v1 battle, but that seems impossible...

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 11:05
by Krom
Yes, that looks like a flaw. Could be fixed I guess.

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 11:55
by The Dark Lord
Would be nice. :)

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 12:37
by Krom
Would be helpfull to file it into github Issues.
And can't promise when and who can actually programm it ..

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 13:05
by The Dark Lord
I'm not in a hurry. I can make and script the rest of the mission(s) while I wait. :)

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 13:09
by Krom
I'm afraid you can make more than that while waiting for it to happen ;-)

Maybe it's better to make a coarse "will do" solution for now (e.g. remove all units and readd the groups anew).

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 15:31
by RandomLyrics
As i remember u have to set alliances for both players separetly:
PlayerAllianceChange(1, 2, false, true);
PlayerAllianceChange(2, 1, false, true);
Hmm i think the 'PlayerAllianceChange' will not work for units 'while fighting'.
Otherwise Krom's soultion will work :)

Re: Changing alliances while fighting

PostPosted: 09 Oct 2015, 18:06
by The Dark Lord
I'm afraid you can make more than that while waiting for it to happen ;-)
Don't be too sure, I'm well known for the awesome slowness in which I make maps these days. :P For now I can just ignore it, because it's not a critical part of the mission. :)

Re: Changing alliances while fighting

PostPosted: 25 Nov 2015, 19:37
by Vatrix
I'd make script for them stop (halt) after you ally them. (not very pro idea, but it works :D)