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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-31-2012, 12:01 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

the orginal OnTrigger is defined in the Battle-Script:
Code:
public virtual void OnTrigger(int missionNumber, string shortName, bool active)
{
    if (this.missions.Count > 0)
    {
        foreach (AMission mission in this.missions)
        {
            if (mission.IsMissionListener(missionNumber))
            {
                mission.OnTrigger(missionNumber, shortName, active);
            }
        }
    }
    else if (active)
    {
        AiAction action = this.GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
        if (action != null)
        {
            action.Do();
        }
    }
}
If you override the OnTrigger - Method, you create a empty new method so the ability to spawn Airgroups etc is lost, this is nessesary to avoid side-effects.
So to get the old behavior you must insert code to spawn the Actors again for example with:
Code:
    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);


        AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));
        if (action != null)
        {
            action.Do();
        }
    }

Last edited by FG28_Kodiak; 10-31-2012 at 12:10 PM.
Reply With Quote
 


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 05:11 PM.


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