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)
-   -   cuestion for a scrip (http://forum.fulqrumpublishing.com/showthread.php?t=33264)

melasuda 07-15-2012 11:04 AM

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

FG28_Kodiak 07-15-2012 11:44 AM

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.

melasuda 07-15-2012 04:46 PM

Thanks bery much:grin::grin:


All times are GMT. The time now is 07:54 PM.

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