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
  #31  
Old 10-17-2011, 04:14 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by David198502 View Post
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;
                
            }
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 05:07 AM.


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