Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 11-16-2011, 02:15 PM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

This was our solution for scores for triggered events. If the blue team should receive for example 50 points for a mission goal, I named the trigger "ScoreBlue50" and the following On Trigger Method added 50 points to the int ScoreBlue:

Code:
public override void OnTrigger(int missionNumber, string shortName, bool active) 
    {
       base.OnTrigger(missionNumber, shortName, active); 

  if (shortName.StartsWith("ScoreRed"))
        {
            StringBuilder b = new StringBuilder(shortName);
            string Number = b.Replace("ScoreRed", "").ToString();
            int Redresult = 0;

            if (int.TryParse(Number, out Redresult))
                ScoreRed += Redresult; 
  
            GamePlay.gpLogServer(null, "The RAF succesfully accomplished one objective: \nTeam scores - RAF {0}: LW {1}", new object[] {ScoreRed, ScoreBlue });
        }
		  if (shortName.StartsWith("ScoreBlue"))
        {
            StringBuilder b = new StringBuilder(shortName);
            string Number = b.Replace("ScoreBlue", "").ToString();
            int Blueresult = 0;

            if (int.TryParse(Number, out Blueresult))
                ScoreBlue += Blueresult; 
   
            GamePlay.gpLogServer(null, "The LW succesfully accomplished one objective: \nTeam scores - RAF {0}: LW {1}", new object[] {ScoreRed, ScoreBlue });
        }
}
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.