EndBattle(1)
Posted: Fri Sep 14, 2012 8:15 am
Hi Pip, should EndBattle(1), end the battle?
I've the following
FUNCTION Tick(side)
{
...
VictoryConditions(); //when exited 7 units game should end
}
then in:
FUNCTION VictoryConditions()
{
…
if(( GetGlobal("vps") >= 1 ) && ( GetGlobal("exitcount") >= 7 ))
{
Log ("End_1");
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_BUCH_VICTORY", "BHead0Image:german_infantry_head");
Log ("End_2");
AddVizDelay(20) ;
EndBattle(1);
}
}
--------
I got an infinite loop, showing the BattlePop0 again and again, Logs 1 and 2 are displayed so… maybe I'm using the wrong function?
I've the following
FUNCTION Tick(side)
{
...
VictoryConditions(); //when exited 7 units game should end
}
then in:
FUNCTION VictoryConditions()
{
…
if(( GetGlobal("vps") >= 1 ) && ( GetGlobal("exitcount") >= 7 ))
{
Log ("End_1");
ShowUIScreenX( "BattlePop0", "Anim1", "IDS_BUCH_VICTORY", "BHead0Image:german_infantry_head");
Log ("End_2");
AddVizDelay(20) ;
EndBattle(1);
}
}
--------
I got an infinite loop, showing the BattlePop0 again and again, Logs 1 and 2 are displayed so… maybe I'm using the wrong function?