View Single Post
  #16  
Old 12-12-2012, 05:35 PM
bolox bolox is offline
Approved Member
 
Join Date: May 2008
Posts: 351
Default

something like that is possible- something very like that is used in the Redux campaign for the 'help in combat' mission

Code:
 private void checkLanded(AiAircraft aircraft) {
    if (GamePlay.gpPlayer().Place() != aircraft)
      return;
	if (end != true) { 
	Campaign.battleSuccess = false;
	GamePlay.gpHUDLogCenter("YOU FAILED! DISMISSED."); //STD 
    Timeout(5.0, () => { ShowResult(true); }); // STD
    return;
	}
	if  ((end = true) && (safe = true))   // check  reached mission objective 
    
	{    
        Campaign.battleSuccess = true;

        writeScore(cPlayer + readScore()); // STD : increase campaign kills 
		
	             
        GamePlay.gpHUDLogCenter("GOOD SHOW! Less than 4 of 111Sqn shot down." ); 
        Timeout(5.0, () => { ShowResult(true); });//STD 
		

        Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD

    }
	
	
	
	
  }
gives a success message if the bool 'end' is satisfied when the player lands. There is some extraneous stuff in there relating to the campaign scoring system.

A 'TGroup Destroyed ' trigger could make bool end = true to make it run?
Reply With Quote