Dissolving alliance via lua?

ww2commander

Emperor
Joined
Aug 23, 2003
Messages
1,243
Location
Australia
Does anyone know if there is a way to dissolve an alliances that has been created via team:AddTeam().

Here is the problem and reason I ask:
1) I have set Germany and Italy in the same team for my scenario via Team:AddTeam().
2) I have an event that flips all Italian cities to Germany to simulate Italy switching to the Allied side.
3) I set Germany to permanent war with Italy
4) All good, except I get a message stating that Germany/Italy alliance has declared war on the Germany/Italy alliance (i.e the team declared war on itself :crazyeye:)

How would I go about resolving this dilemma?
 
via TeamAxis:AddTeam(TeamItaly)

Looking in the DLL, this removes all the players from TeamItaly and adds them into TeamAxis.

Unfortunately, there is no TeamAxis:RemovePlayer(PlayerItaly), ie it's a one-way deal.
 
So I discovered a limitation and bug in one go!

WINNING :rockon:
 
Back
Top Bottom