View Single Post
  #4  
Old 11-21-2012, 04:40 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can use a script:

Code:
using System;
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);


        GamePlay.gpLogServer(null, "Trigger: {0} activated", new object[]{shortName}); // for testing remove if not longer needed


        if (shortName.Equals("PlaneSpawnTrigger")) // insert the triggername between the ""
        {
            AiAction action = GamePlay.gpGetAction("SpawnAirgroup1"); // insert the actionname between the ""

            if (action != null)
                action.Do();

            action = GamePlay.gpGetAction("SpawnAirgroup2"); // insert the actionname between the ""

            if (action != null)
                action.Do();
        }
        else 
        {
            AiAction action = GamePlay.gpGetAction(shortName);

            if (action != null)
                action.Do();
        }

    }
   

}
Reply With Quote