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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2011, 06:50 PM
Megahurt Megahurt is offline
Approved Member
 
Join Date: Oct 2011
Posts: 54
Default need help with script

Ive tried and tried but i cant get it right...

I have a trigger in the mission called "PlayerGetsClose"
when blue army passes through it becomes active.
Its suppossed to load a mission file called dovertrains.mis
the path is missions\dogfights\DoverTrains\red


There is a second trigger called "Sheernes"
when blue army passes through it becomes active.
Its suppossed to load a mission file called sheernes.mis.
the path is missions\dogfights\DoverTrains\red

Can anyone right this cs file for me? Ive tried to copy others and edited but i keep getting errors.

Please help.

Megahurt
Reply With Quote
  #2  
Old 12-20-2011, 07:08 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

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

public class Mission : AMission
{

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

        MissionNumberListener = -1;
    }



    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
    
    
        if ("PlayerGetsClose".Equals(shortName))
        {
            GamePlay.gpPostMissionLoad(@"missions\dogfights\DoverTrains\red\dovertrains.mis");
            GamePlay.gpGetTrigger(shortName).Enable = false; 
        }

        if ("Sheernes".Equals(shortName))
        {
            GamePlay.gpPostMissionLoad(@"missions\dogfights\DoverTrains\red\sheernes.mis");
            GamePlay.gpGetTrigger(shortName).Enable = false;
        }
    }
}
Reply With Quote
  #3  
Old 12-20-2011, 08:26 PM
Megahurt Megahurt is offline
Approved Member
 
Join Date: Oct 2011
Posts: 54
Default Thanks

Thanks Kodiak
Hopefully others wanting to do the same can copy this as a template for a simple script that can be easily edited to suit.

Much appreciated.

Megahurt
Reply With Quote
  #4  
Old 12-20-2011, 08:53 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Oh they will get a complete tutorial about this in the near future
Reply With Quote
Reply


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 09:38 PM.


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