Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   need help with script (http://forum.fulqrumpublishing.com/showthread.php?t=28586)

Megahurt 12-20-2011 06:50 PM

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

FG28_Kodiak 12-20-2011 07:08 PM

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;
        }
    }
}


Megahurt 12-20-2011 08:26 PM

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

FG28_Kodiak 12-20-2011 08:53 PM

Oh they will get a complete tutorial about this in the near future ;)


All times are GMT. The time now is 03:01 PM.

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