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
  #2  
Old 09-16-2011, 12:33 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can use SayToGroup

maddox.game.world.AiAircraft
void SayToGroup(maddox.game.world.AiAirGroup group, string msg)
msg is the filename without ogg. (blue in de folder, red in gb folder) Different Aircrafts uses different voices (Actor1..4)

In my example the 'pilot' from Aircraft 0:BoB_LW_JG26_I.000 says "one mile" "Cargo Ships" "Destroy targets left to right" "Attack" (in German) to his group (for testing after ca.10sec, you can use triggers etc. also).

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


public class Mission : AMission
{

    AiActor a1;
    AiAircraft airc1;

    public override void OnBattleStarted()
    {
        base.OnBattleStarted();
        a1 = GamePlay.gpActorByName("0:BoB_LW_JG26_I.000");


        if (a1 == null)
        {
            GamePlay.gpLogServer(null, "SCRIPT ERROR: Aircraft not found\n", new object[] {});
        }

        airc1 = (AiAircraft)a1;
    }


    public override void OnTickGame()
    {
        if (Time.tickCounter() == 300) // ca 10sec.        
        {
            double initTime = 0.0;

            airc1.SayToGroup(airc1.AirGroup(), "1_mile");

            Timeout(initTime += 5.0, () =>
            {
                airc1.SayToGroup(airc1.AirGroup(), "Cargo_Ships");
            });
            Timeout(initTime += 5.0, () =>
            {
                airc1.SayToGroup(airc1.AirGroup(), "Destroy_targets_left_to_right");
            });
            Timeout(initTime += 5.0, () =>
            {
                airc1.SayToGroup(airc1.AirGroup(), "Attack");
            });
        }
    }
}

Last edited by FG28_Kodiak; 09-16-2011 at 01:21 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 02:47 PM.


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