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, 06:30 PM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

ok tried it, but i still dont know when and how i use those parts....
this is what i have so far....

PHP Code:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;

public class 
Mission AMission
{

 public 
override void OnBattleStarted()
    {
        
base.OnBattleStarted();

        
MissionNumberListener = -1;
    }

    public 
override void OnActorCreated(int missionNumberstring shortNameAiActor actor)
    {
        
base.OnActorCreated(missionNumbershortNameactor);

        if (
actor is AiAircraft)
        {
            switch ((
actor as AiAircraft).InternalTypeName())
            {

                case 
"bob:Aircraft.He-111P-2":

                    
Timeout(420, () =>    // Time in Seconds
                         
{
                             (
actor as AiAircraft).Destroy();
                         });
                    break;
            }
        }
    }


 
public 
override void OnTickGame()
{
Random ZufaelligeMission = new Random();
       
            switch (
ZufaelligeMission.Next(1,5))
            {
                case 
1:
                    
GamePlay.gpPostMissionLoad("missions\\Single\\apocalypseLondon\mission1.mis");
                break;
                case 
2:
                    
GamePlay.gpPostMissionLoad("missions\\Single\\apocalypseLondon\\mission2.mis");
                break;
                case 
3:
                    
GamePlay.gpPostMissionLoad("missions\\Single\\apocalypseLondon\\mission3.mis");
                break;
                case 
4:
                    
GamePlay.gpPostMissionLoad("missions\\Single\\apocalypseLondon\\mission4.mis");
                break;
                
            }

}
}
}

there is a main mission, with a bf109 and 9He's(which should be destroyed after xx seconds)

after xx seconds i want the game to load one mission ,selected randomly out of 4 submissions.
i also want the He's loaded with the submission to be destroyed after the xx seconds, like the ones from the main mission.
and i want the game to repeat that process, so that every xx seconds a new mission is loaded randomly.....so that the mission can run forever
__________________

Last edited by David198502; 10-17-2011 at 06:33 PM.
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 06:34 PM.


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