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
  #1  
Old 12-25-2012, 06:08 PM
Mike_Sky Mike_Sky is offline
Registered 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
 


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


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