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 07-15-2012, 11:04 AM
melasuda melasuda is offline
Approved Member
 
Join Date: Feb 2012
Posts: 44
Default cuestion for a scrip

Hi all.

I have one cuestion.

Can i create 3 or 4 AI groups using only one target pass army trigger ?.

If the answer is yes, can anyone send my the script?

THX
Reply With Quote
  #2  
Old 07-15-2012, 11:44 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Yes it's possible.

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 (shortName.Equals("YourTriggerName"))
        {
            
            List<string> actions = new List<string>{"Action1", "Action2", "Action3", "Action4"};

            actions.ForEach(item => {
                                        AiAction action = GamePlay.gpGetAction(item);
                                        if (action != null)
                                           action.Do();
                                    });
            GamePlay.gpGetTrigger(shortName).Enable = false; // to avoid multible activations
        }
    }


}
change "YourTriggerName" and the action names in {"Action1", "Action2", "Action3", "Action4"} to your needs.
Reply With Quote
  #3  
Old 07-15-2012, 04:46 PM
melasuda melasuda is offline
Approved Member
 
Join Date: Feb 2012
Posts: 44
Default

Thanks bery much
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 04:38 AM.


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