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 10-04-2011, 02:19 PM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

I don´t know if it was fixed in the Beta, but the action (spawn airgroup) of triggers was broken, some patches ago. So you have to use a script to link triggers and actions. I supposed you set the trigger and the action in the FMB.
__________________
http://cornedebrouwer.nl/cf48e
Reply With Quote
  #2  
Old 10-04-2011, 03:27 PM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by SNAFU View Post
I don´t know if it was fixed in the Beta, but the action (spawn airgroup) of triggers was broken, some patches ago. So you have to use a script to link triggers and actions. I supposed you set the trigger and the action in the FMB.
That's what I've done. The info window reports that the group has spawned in my test, indicating that the script has executed, but alas no planes actually spawned

Here's the script I used, the trigger & the spawn airgroup (after 60s) actions are both named 'Dorniers'...

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

if ("Dorniers".Equals(shortName) && active)
{
AiAction action = GamePlay.gpGetAction("Dorniers"); //same as YourTriggerName
GamePlay.gpLogServer(null, " German bomber group spawned ", new object[] { }); //Testmessage
if (action != null)
{
action.Do();
}
GamePlay.gpGetTrigger(shortName).Enable = false;
}
}
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote
  #3  
Old 10-04-2011, 03:38 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by salmo View Post
after 60s
How is this possible?

Try without the delay.
Reply With Quote
  #4  
Old 10-04-2011, 03:50 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Made a sample mission, the Doniers spawn after 10sec.
Attached Files
File Type: zip Donier.zip (1.0 KB, 77 views)
Reply With Quote
  #5  
Old 10-15-2011, 10:20 AM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

im still not able to spawn a single plane after another one gets destroyed!!!
why the heck has this to be sooo hard to achieve...damn
triggers dont seem to work and the scripts showed here in this thread dont seem to work either if i copy and paste them in the mission cs file.
__________________

Last edited by David198502; 10-15-2011 at 11:13 AM.
Reply With Quote
  #6  
Old 10-15-2011, 11:13 AM
David198502's Avatar
David198502 David198502 is offline
Approved Member
 
Join Date: Dec 2009
Location: Austria
Posts: 1,536
Default

thats what i did so far...
Attached Files
File Type: zip scriptversuch.zip (1.3 KB, 8 views)
__________________
Reply With Quote
  #7  
Old 10-15-2011, 11:47 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

I've tested your mission, the problem is that the trigger is never triggered (testet it with different numbers of planes and plane types), then remove the trigger and made a new one but no effect, may be a bug in the Beta. Normaly your code should work.

So I made a workaroung without trigger.

Code:
using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{

    public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
    {
        base.OnActorDead(missionNumber, shortName, actor, damages);

        AiAction MakeNewAircraft = GamePlay.gpGetAction("SpawnAircraft");
        
        if (actor != null && MakeNewAircraft != null)
        {
            if (actor.Name().Contains("BoB_RAF_F_FatCat_Early.000"))
            {

                MakeNewAircraft.Do();
                GamePlay.gpHUDLogCenter("New Enemy spawned!");
            }
        }
    }
}
What you need:
The script, a action in your Mission (i labled it "SpawnAircraft"), the name of the plane to destroy.
A new Airplane spawns after the previous is shoot down, you can improve it by adding a Planecount, etc.
Attached Files
File Type: zip SpawnAircraft.zip (1.2 KB, 19 views)

Last edited by FG28_Kodiak; 10-15-2011 at 01:03 PM.
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 12:41 PM.


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