The next region block is inputs for timer periods for the core engine, and random input names. If you add more random names, add the random name here. Also the block contains some references to Triggers and 2D locations of trigger locations.
The timers are editable, but note I have setup four periods on fairly tight time periods (1min repeats), where they can overlap at times. Slightly pulsing effect. Again layout is so that edits happen here and you don’t need to touch core engine.
Code:
/*=========================================*/
#region Repeats and delays & Random selection varibles
//tick time can alter length due to processing damands, however assume 30/sec
//1 sec = 30 ticks
//1 min = 1800 ticks
//1hour = 108000 ticks
//note, r value must be bigger than d value
private int rt0 = 9000;//5 min repeat
private int dt0 = 1800;//1 min delay
private int rt1 = 9000;//5 min repeat
private int dt1 = 3600;//2 min delay
private int rt2 = 18000;//10 min repeat
private int dt2 = 5400;//3 min delay
private int rt3 = 27000;//15 min repeat
private int dt3 = 7200;//4 min delay
//timer reset(start value, gets randomised 100~900 in map selection,)
//auto reset switch delay stops multible trigger loading, this version resets by random time period(100~900 secs)
//for fixed value unrem the pvt double below, rem out random version in map selection
//private double rsukS1 = 300;
Random rsukS1 = new Random();
private int ukS1 = 1;
Random rsukS2 = new Random();
private int ukS2 = 1;
Random rsukS3 = new Random();
private int ukS3 = 1;
private double rsukS4 = 3600;
private int ukS4 = 1;
Random rsdeS1 = new Random();
private int deS1 = 1;
Random rsdeS2 = new Random();
private int deS2 = 1;
Random rsdeS3 = new Random();
private int deS3 = 1;
private double rsdeS4 = 3600;
private int deS4 = 1;
Random rand = new Random();//random mis selection
#endregion
/*=========================================*/
The next region block actually is part of the lists, these classes pull in the lists into the code to be available for use. If you add more lists, you need another relevant class by name sake to pull the list data into the script.
Code:
/*=========================================*/
#region Mission classes
internal class SubM //SubMission
{
public string MN { get; set; }//MissionName
public string MM { get; set; }//MissionMessage
public string MMR { get; set; }//MissionMessageRed
public string MMB { get; set; }//MissionMessageBlue
public SubM(string mn, string mm, string mmr, string mmb)
{
this.MN = mn;
this.MM = mm;
this.MMR = mmr;
this.MMB = mmb;
}
}
internal class TM100 //Triggered missions
{
public string TN { get; set; }//MissionName
public string TM { get; set; }//MissionMessage
public string TMR { get; set; }//MissionMessageRed
public string TMB { get; set; }//MissionMessageBlue
public TM100(string tn, string tm, string tmr, string tmb)
{
this.TN = tn;
this.TM = tm;
this.TMR = tmr;
this.TMB = tmb;
}
}
internal class TM150 //Triggered missions
{
public string TN { get; set; }//MissionName
public string TM { get; set; }//MissionMessage
public string TMR { get; set; }//MissionMessageRed
public string TMB { get; set; }//MissionMessageBlue
public TM150(string tn, string tm, string tmr, string tmb)
{
this.TN = tn;
this.TM = tm;
this.TMR = tmr;
this.TMB = tmb;
}
}
internal class TM200 //Triggered missions
{
public string TN { get; set; }//MissionName
public string TM { get; set; }//MissionMessage
public string TMR { get; set; }//MissionMessageRed
public string TMB { get; set; }//MissionMessageBlue
public TM200(string tn, string tm, string tmr, string tmb)
{
this.TN = tn;
this.TM = tm;
this.TMR = tmr;
this.TMB = tmb;
}
}
internal class TM250 //Triggered missions
{
public string TN { get; set; }//MissionName
public string TM { get; set; }//MissionMessage
public string TMR { get; set; }//MissionMessageRed
public string TMB { get; set; }//MissionMessageBlue
public TM250(string tn, string tm, string tmr, string tmb)
{
this.TN = tn;
this.TM = tm;
this.TMR = tmr;
this.TMB = tmb;
}
}
#endregion
/*=========================================*/