Page 1 of 1
Question on victory logic?
Posted: Fri Jul 27, 2012 6:25 am
by GottaLove88s
Gents, Q on victory logic please.
I've adapted Slith's Meeting Engagment Redux map to create a new scenario.
How does BA's game engine handle victory if both sides have 3 flags each (or 1, or 2) by turn 0.
It hasn't happened yet, but one day it will, so I want to be sure I've got this nailed...
Thanks!
GL88
Re: Question on victory logic?
Posted: Fri Jul 27, 2012 8:20 am
by rf900
Not sure if it is the same you have and I haven't test it, but it appears that the game will continue in case of tie until one side captures more vp than the other.
Code: Select all
if( GetTurn() >= GetGlobal("turnLimit") )
{
side0Score = COUNT_VPS (0) ;
side1Score = COUNT_VPS (1) ;
// if they are equl it will continue till one side has more
if ( side0Score > side1Score )
{
// ShowUIScreenY("BattlePop0", "Anim1", "IDS_VICTORY");
// AddVizDelay(10) ;
AddVizFunctionCall("EndBattle", 0) ;
}
if ( side0Score < side1Score )
{
// ShowUIScreenY("BattlePop0", "Anim1", "IDS_VICTORY");
// AddVizDelay(10) ;
AddVizFunctionCall("EndBattle", 1) ;
}
}
Re: Question on victory logic?
Posted: Fri Jul 27, 2012 8:28 am
by GottaLove88s
Thanks RF, that's perfect. I assume that code came across with the original Meeting Engagement .bam, so the safe answer is to leave well alone. Much appreciated
