Question on victory logic?

Download scenarios and talk about scenario design.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Question on victory logic?

Post 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
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
rf900
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 339
Joined: Fri May 04, 2012 6:59 am

Re: Question on victory logic?

Post 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) ;
		}
	}
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Question on victory logic?

Post 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 :-)
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
Post Reply

Return to “Battle Academy : Scenario Design”