1C Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official 1C Company forum > 1C Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2012, 06:08 PM
Mike_Sky Mike_Sky is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default SayToGroup...

I would send some radio messages in flight, online mission.

I've try this code, with triggers 'OnR' & 'OnB',

Quote:
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using maddox.game;
using maddox.game.world;
using maddox.GP;


public class Mission : AMission
{
//bool flag1 = true;
bool flag1 = false;
bool flag2 = false;


public override void OnTrigger(int missionNumber, string shortName, bool active)
{
if (("OnR".Equals(shortName)) && active)
{
//GamePlay.gpHUDLogCenter("Test trigger OnR");
GamePlay.gpGetTrigger("OnR").Enable = false;
flag1 = true;
}
if (("OnB".Equals(shortName)) && active)
{
//GamePlay.gpHUDLogCenter("Test trigger OnB");
GamePlay.gpGetTrigger("OnB").Enable = false;
flag2 = true;
}
}


public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceEnter(player, actor, placeIndex);
AiAircraft aircraft = actor as AiAircraft;
if (aircraft != null)
switch (aircraft.Army())
{
case 1:
if (flag1 == true)
{
//GamePlay.gpHUDLogCenter("TEST RAF???");
aircraft.SayToGroup(aircraft.AirGroup(), "Hello_guys"); //ex...
}
break;
case 2:
if (flag2 == true)
{
GamePlay.gpHUDLogCenter("TEST LW ");
}
break;
}
}
}
I don't understand why 'flags' don't work.
Thank's a lot for your help!
And sorry for my very bad english...


PS: if "bool flag(x) = true", radio messages are listened.
Reply With Quote
  #2  
Old 01-04-2013, 10:18 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Some of the pre-recorded mesages are broken & don't play even when the code is correct. Try changing:

aircraft.SayToGroup(aircraft.AirGroup(), "Hello_guys")

to

aircraft.SayToGroup(aircraft.AirGroup(), "Attention")

I know that "Attention" works. That way you'll know if it's your code or a game bug.
__________________
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 01-04-2013, 05:05 PM
Mike_Sky Mike_Sky is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default

Thank's a lot sir.

I'll found my way with help from: http://forum.1cpublishing.eu/showpos...3&postcount=10

TY again.
Reply With Quote
  #4  
Old 01-06-2013, 05:52 PM
Mike_Sky Mike_Sky is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default

Your code is not complet, may be a mistake?
It's possible to find this?
TY.
Reply With Quote
  #5  
Old 01-07-2013, 04:31 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by Mike_Sky View Post
Your code is not complet, may be a mistake?
It's possible to find this?
TY.
I'm not sure what you mean? Except that there's a missing semi-colon from the end of the line.

aircraft.SayToGroup(aircraft.AirGroup(), "Attention");
__________________
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
  #6  
Old 01-07-2013, 05:04 PM
Mike_Sky Mike_Sky is offline
Junior Member
 
Join Date: Jun 2010
Posts: 4
Default

I was talking about the beginning of this code: http://forum.1cpublishing.eu/showpos...3&postcount=10

If you could show me this/your work, that's will be very fine...
If you could'nt, it's really not a problem, you help me a lot, before, with your samples!
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:14 AM.

Based on a design by: Miner Skinz.com

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2007 1C Company. All rights reserved.