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-07-2011, 01:56 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Made some rework on the script:

latest version:
http://forum.1cpublishing.eu/showpos...8&postcount=41

Added a exept version:
private void sendChatMessageTo(int army, string[] exepttoplayerlanguages, string msg, object[] parms)
private void sendScreenMessageTo(int army, string[] exepttoplayerlanguages, string msg, object[] parms)
Second Argument is a array of string.
so you can enter the languages this message should not be send
sendScreenMessageTo(-1, new string[] { "de", "ru" }, "Hello", null);

usefull if you have send a Message to for example the german players but dont want send a other language message to them
sendScreenMessageTo(-1, "de" }, "Hallo", null);
sendScreenMessageTo(-1, new string[] { "de" }, "Hello", null);
so the germans (with the german game version) get the german "Hallo"
and all other players gets the english "Hello".

Last edited by FG28_Kodiak; 10-12-2011 at 11:29 AM.
Reply With Quote
  #2  
Old 10-07-2011, 03:17 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Just WOW! A lot of work and quality one. I will use it in a new mission version.

BTW can I replace my methods that send messages to individual players with your methods somehow? I use methods like follows:
Code:
    private void objMsg(Player player)
    {
        switch (player.LanguageName())
        {
            case "de":
                GamePlay.gpLogServer(new Player[] { player }, "Achieve air superiority and attack ground targets in C5, D4 and E3!", null);
                break;
            case "ru":
                GamePlay.gpLogServer(new Player[] { player }, "Обеспечьте превосходство в воздухе и атакуйте наземные цели в квадратах C5, D4 и E3!", null);
                break;
            default:
                GamePlay.gpLogServer(new Player[] { player }, "Achieve air superiority and attack ground targets in C5, D4 and E3!", null);
                break;
        }
    }
E.g. can new Player[] { player } be used instead of army in your methods? It is not that important, just want to know.

I will replace "de" message if you give me a translation
Reply With Quote
  #3  
Old 10-07-2011, 03:24 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Not at the moment but its no problem to integrate this.

"Achieve air superiority and attack ground targets in C5, D4 and E3!"
in german
"Luftüberlegenheit erringen und Bodenziele in C5, D4 und E3 angreifen!"

Last edited by FG28_Kodiak; 10-07-2011 at 04:06 PM.
Reply With Quote
  #4  
Old 10-07-2011, 03:53 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

So integrated:

latest version:
http://forum.1cpublishing.eu/showpos...8&postcount=41

first argument is from type Player, for this example i use the player from OnPlaceEnter(...), so the player sees Hallo if he is german and a english "Hello" he is not.

sendScreenMessageTo(player, "de", "Hallo", null);
sendChatMessageTo(player, "de", "Hallo", null);

sendScreenMessageTo(player, new string[] {"de"}, "Hello", null);
sendChatMessageTo(player, new string[] { "de" }, "Hello", null);

Last edited by FG28_Kodiak; 10-12-2011 at 11:30 AM.
Reply With Quote
  #5  
Old 10-07-2011, 05:38 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Sounds like magic! Thank you!
Reply With Quote
  #6  
Old 10-11-2011, 06:12 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Hi, Kodiak!
I am facing some issues integrating your message system into my Steppe mission. We plan to put the mission up on R2 or R3 (Repkas) after the official patch is out an I hope you can help me to get it working. I am obviously making something wrong but can not get through it for 3 days already due to lack of basic knowledge.

I divided all the script into #region-s and commented the regions in which messages are available. I described the parts which are not working in comments. Please let me know if it is comfortable for you or you want me to paste the list of issues and parts of the script here on the forum.

In general the issue is that script works on a hosted server which I start ingame (and no one connected). So it sends messages to me as a host. But the script does not work on a dedicated server when I connect to it. The "NET settings" message creates so many errors that a game freezes and some lines of code are skipped like current109s++ in not calculated.

I attach also a server log with errors I get.
Thanks in advance for any advice.
Attached Files
File Type: zip msgErrors.zip (16.7 KB, 1 views)
File Type: zip r_steppe for forum.zip (20.6 KB, 3 views)
Reply With Quote
  #7  
Old 10-11-2011, 06:44 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Seems the problem is the
Timeout(12, () =>
may be the player is no longer valid after 12 sec, can you test it without the timeout or a shorter one?
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 01:12 AM.


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