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 12-03-2011, 09:17 PM
smokincrater smokincrater is offline
Approved Member
 
Join Date: Nov 2007
Posts: 62
Default trigger points and spawning

G`day, having trouble getting the FMB to spawn other units from a trigger. For instance I want the computer to spawn a RAF unit when the Luftwaffe pass through a point(trigger) on the map. Also i want to spawn returning escorts on the way home for the returning bombers.

Also has can anyone give me a tip for getting the computer to select the best runway for take off( I.e. the one i want).
__________________
Health Authorites warn that smoking is a health hazard.
Reply With Quote
  #2  
Old 12-03-2011, 10:09 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Can you post your mission, so we can take a look at it?

The start direction depends on wind direction. To get your prefered runway you must change the wind direction in the mission preferences (View-Menu).
Reply With Quote
  #3  
Old 12-04-2011, 05:19 AM
smokincrater smokincrater is offline
Approved Member
 
Join Date: Nov 2007
Posts: 62
Default

how can i post the mission to you?
__________________
Health Authorites warn that smoking is a health hazard.
Reply With Quote
  #4  
Old 12-04-2011, 05:56 AM
smokincrater smokincrater is offline
Approved Member
 
Join Date: Nov 2007
Posts: 62
Default

runway issue sloved. Now all i have to work out is how get the tiggers and actions working as i have no idea about scripting!
__________________
Health Authorites warn that smoking is a health hazard.
Reply With Quote
  #5  
Old 12-04-2011, 06:45 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Without scripting your trigger and the action must have the same name.
Example, if your trigger has the name 'SpawnAirgroup1' your action must have the name 'SpawnAirgroup1', also.


To post your mission. Zip the files and upload it via 'Manage Attachment' found under Additional Options if you post a message.
Reply With Quote
  #6  
Old 12-04-2011, 07:46 AM
smokincrater smokincrater is offline
Approved Member
 
Join Date: Nov 2007
Posts: 62
Default

Posted zip file!!

Tried renaming triggers and actions but did not work. Thank you also for this.
Attached Files
File Type: zip spawning.zip (1.8 KB, 9 views)
__________________
Health Authorites warn that smoking is a health hazard.
Reply With Quote
  #7  
Old 12-04-2011, 10:04 AM
ATAG_Bliss ATAG_Bliss is offline
Approved Member
 
Join Date: Mar 2010
Posts: 1,156
Default

Hi smokin,

Just had a quick look at this through the notepad. What are you trying to do with the passthroughs? Are you wanting to spawn certain planes if a particular air/ground group goes through the passthrough area?
__________________

ATAG Forums + Stats
Reply With Quote
  #8  
Old 12-04-2011, 10:15 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Corrected:
By spawning Airgroups you should activate "only Script spawn" in their options.

You use passthroughs-Triggers, there is a problem the are activated two times on enter and on leave. To avoid the second activation, you should deaktivate the trigger via script.
Sometimes if a Group is not spawning, it helps to select it again in the action-options.


So i've added a little script:
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{

    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);

        AiAction Action = GamePlay.gpGetAction(shortName);

        if (Action != null)
            Action.Do();
        
        GamePlay.gpGetTrigger(shortName).Enable = false;
    }
}
Tested the Mission, now it should work.
Attached Files
File Type: zip Spawning.zip (2.1 KB, 15 views)

Last edited by FG28_Kodiak; 12-04-2011 at 10:18 AM.
Reply With Quote
  #9  
Old 12-04-2011, 10:52 AM
BGs_Ricky BGs_Ricky is offline
Approved Member
 
Join Date: Feb 2010
Location: Lausanne, Switzerland
Posts: 139
Default

Hi Kodiak,

does the script you just put here avoid a further activation of a passthrough trigger ?
I've been looking for one since I made a small mission weeks ago and couldn't find a way to spawn an air group only once, as another was spawned everytime the condition was met again (in that case red planes flying through it).

Thx !
Reply With Quote
  #10  
Old 12-04-2011, 11:59 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Yes.

I deactivate it with
GamePlay.gpGetTrigger(shortName).Enable = false;
so it is not activated a second time.
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 06:34 PM.


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