Quote:
Originally Posted by David198502
ok Kodiak...i tried the script.
the He's of the main mission disappear after the 60seconds, but all other He's of the submissions will stay on the map...
so i pasted the relevant part of the script in all the submissios to destroy these He's as well.....this works!
...but is it possible to edit the script of the main mission, that all He's, including the ones of the submissions, disappear?
|
Yes it's possible, you must set the MissionNumberListener = -1, -1 means the script 'listen' to all events in all missions. If you only want one mission are listen you must specify the MissionNumber of the mission.
The best place for the MissionNumberListener is a method that called at the begin of a Mission. Normaly i use OnBattleStarted()
Code:
public override void OnBattleStarted()
{
base.OnBattleStarted();
MissionNumberListener = -1;
}
Quote:
i also saw that it is possible to load submissions randomly...but in your tutorial you have some conditions which determine whether a mission is loaded or not(mission x will not be loaded if one destroys friendly vehicle)...i would like to load submissions randomly, regardless of any conditions, every xx seconds.is that possible?
i think its a better solution for my purpose to load submissions by random than loading mission after mission in determined sequence, because this would add an surprising factor, and i think it would shorten the script drastically, if i want to have 20 or more submissions.
|
Yes its possible the only thing you need is in OnTickGame()
Code:
Random ZufaelligeMission = new Random();
switch (ZufaelligeMission.Next(1,5))
{
case 1:
GamePlay.gpPostMissionLoad("missions\\Single\\Samples\\TestSubmissions\\MissionNachladen6Sub1.mis");
break;
case 2:
GamePlay.gpPostMissionLoad("missions\\Single\\Samples\\TestSubmissions\\MissionNachladen6Sub2.mis");
break;
case 3:
GamePlay.gpPostMissionLoad("missions\\Single\\Samples\\TestSubmissions\\MissionNachladen6Sub3.mis");
break;
case 4:
GamePlay.gpPostMissionLoad("missions\\Single\\Samples\\TestSubmissions\\MissionNachladen6Sub4.mis");
break;
}