View Single Post
  #3  
Old 03-27-2012, 02:14 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default

I had a think about it. I do have the BOOL's for each trigger to check.

You think this would work? I am checking each Bool that they are True. Then reseting htem to False if they are true and sending out the messges.

I have OnTrigger set and that works fine. I am hoping the code below will give me the update every 10 mins that the objective is complete IF the BOOL's are True.

Code:
public class Mission : AMission
{
	bool  BGTarget2 = false; 	//German Bomber group 1 of 6
	bool  BGTarget2_1 = false; 	//German Bomber group 2 of 6
	bool  BGTarget2_2 = false; 	//German Bomber group 3 of 6

   public override void OnTickGame()
    {
	base.OnTickGame();
	{
			
		if (Time.tickCounter() % 18000 == 17990) //check every 10 mins	
		//if (Time.tickCounter() % 68 == 1) ///Check every 2 seconds
		{	
	
			if ((BGTarget2 == true) && (BGTarget2_1 == true) && (BGTarget2_2 == true))
			{
			BGTarget2 = false;
			BGTarget2_1 = false;
			BGTarget2_2 = false;
			GamePlay.gpLogServer(null, "Team scores - RAF {0}: LW {1}", new object[] { ScoreRed,ScoreBlue });
			GamePlay.gpLogServer(null, "Team Objectives Completed - RAF {0} of 2: LW {1} of 2", new object[] { ScoreRed,ScoreBlue });
			Timeout(10, () =>
				{
				GamePlay.gpHUDLogCenter("Red Objective 11 Completed!!!");
				});
			}
		}
  
	}	
	}
}
__________________
__________________
Win7, 64bit Ultra
Asus P8P67Pro MB
Intel i7-2600K
Coursair 16GB (4x 4GB), DDR3-1600MHz
Gainward Nvidia 580GTX 3GB DDR5
850-Watt Modular Power Supply
WIN7 and COD on Gskill SSD 240GB
40" Panasonic LCD
TrackIR5 +
Thrustmaster Warthog stick, throttle & pedals
Reply With Quote