Results 1 to 9 of 9

Thread: Message to players in the FMB

  1. #1
    Veteran Combat pilot
    Join Date
    Nov 2020
    Posts
    250
    Post Thanks / Like
    Total Downloaded
    1.53 MB

    Message to players in the FMB

    Hi all,

    In order to create a new, more immersive and realistic multiplayer campaign, I am looking for information to make messages appear to the pilots during a game, of course I don t know the script and the code unfortunately.
    I only copied and pasted a REFUEL AND REARM script which I added at the end of my .cs file for exemple.
    I'm only looking to display simple messages to start with, like SCRAMBLE or enemy aircraft located in a particular sector.
    How to send them to both camps or just one.

    Thanks to anyone who can help me in any way.

  2. #2
    Combat pilot FTC_Rostic's Avatar
    Join Date
    Nov 2023
    Posts
    143
    Post Thanks / Like
    Total Downloaded
    35.95 MB

    Re: Message to players in the FMB

    You need something like this:

    Code:
    Player[] recepients = { player };
    GamePlay.gpHUDLogCenter(recepients, "Blah blah blah!");
    Dig there: https://drive.google.com/file/d/1Ei6...usp=drive_link

    My favorite archive to dig for script code examples: Full Mission Builder And DedicServer\Downloads\SCRIPTS_allSamples2.zip
    PC spec: Intel Core i7 8700K 3.7Ghz, DDR4 32Gb 2666Mhz, Asus Prime Z370-A, ADATA XPG SX8200 240Gb (PCIe Gen3x4), RTX 2060 6Gb
    Monitor: DELL P2717H (1920x1080:60Hz)
    Joystick: Android smartphone MonectPC app (virtual joystick driver)
    Hadtracker: Track IR 4 / No VR

    Enjoy multiplayer historical campaigns with Flying Tin Cans.
    Join us: https://flyingtincans.com —(•)— Discord —(•)— YouTube


  3. Likes OBT~Polak liked this post
  4. #3
    Veteran Combat pilot
    Join Date
    Nov 2020
    Posts
    250
    Post Thanks / Like
    Total Downloaded
    1.53 MB

    Re: Message to players in the FMB

    Thank you for your response Rostic,

    When will the message appear, is it a trigger that does it?

    For example, I would like to display a message 1 minute after the start of a multiplayer mission to indicate to pilots where an enemy formation is located, in order to recreate the information received by radio by the pilots.

  5. Likes FTC_Rostic liked this post
  6. #4
    Combat pilot FTC_Rostic's Avatar
    Join Date
    Nov 2023
    Posts
    143
    Post Thanks / Like
    Total Downloaded
    35.95 MB

    Re: Message to players in the FMB

    Quote Originally Posted by OBT~Polak View Post
    Thank you for your response Rostic,

    When will the message appear, is it a trigger that does it?

    For example, I would like to display a message 1 minute after the start of a multiplayer mission to indicate to pilots where an enemy formation is located, in order to recreate the information received by radio by the pilots.
    Sounds like you need to go through any beginners guide to C# and TFS should finally made a manual to mission scripting

    You should not expect that all players will be on the server 1 minuter after restart, due to usually most players making a short break. You better do it 1 minuter after player took off. Use event "OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)" but make sure to check that there is a player in aircraft (no AI). Also probably this will not work in case of airspawn. Also there is an event OnPlaceEnter(Player player, AiActor actor, int placeIndex) but that happens any time player change his place in any multycrew aircraft.

    Sorry, I do not have time to write full script. Here is example how to execute anything by timeout in mission where ever you want it (in this example it is OnBattleStarted event):
    Code:
        public override void OnBattleStarted()
        {
            base.OnBattleStarted();
    
    
            /////////////////////////////////////
            // write mission custom code below
    
            // 15 - is seconds
            Timeout(15, () =>
            {
                AnyFunctionYouWantToRun();
            });
    
            // write mission custom code above
            /////////////////////////////////////
    
            // listen all the mission
            MissionNumberListener = -1;
        }
    
        public void AnyFunctionYouWantToRun() {
             // write your code here
        }
    One more example (not exactly what you want, but may work some times):
    Code:
        public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
        {
            base.OnPlaceEnter(player, actor, placeIndex);
    				
            /////////////////////////////////////
            // write mission custom code below
            Player[] recepients = { player };
    				
    
            Timeout(60, () =>
            {
                GamePlay.gpHUDLogCenter(recepients, "Blah blah blah!");
            });
    
            // write mission custom code above
            /////////////////////////////////////
        }
    PC spec: Intel Core i7 8700K 3.7Ghz, DDR4 32Gb 2666Mhz, Asus Prime Z370-A, ADATA XPG SX8200 240Gb (PCIe Gen3x4), RTX 2060 6Gb
    Monitor: DELL P2717H (1920x1080:60Hz)
    Joystick: Android smartphone MonectPC app (virtual joystick driver)
    Hadtracker: Track IR 4 / No VR

    Enjoy multiplayer historical campaigns with Flying Tin Cans.
    Join us: https://flyingtincans.com —(•)— Discord —(•)— YouTube


  7. Likes OBT~Polak liked this post
  8. #5
    Veteran Combat pilot
    Join Date
    Nov 2020
    Posts
    250
    Post Thanks / Like
    Total Downloaded
    1.53 MB

    Re: Message to players in the FMB

    A big thank you to you Rostic, this will undoubtedly help me a lot .
    But you're right, I especially need to take C# coding lessons.

  9. #6
    Combat pilot
    Join Date
    Oct 2021
    Posts
    124
    Post Thanks / Like
    Total Downloaded
    12.95 MB

    Re: Message to players in the FMB

    Hello OBT~Polak, give it a try:

    http://www.team-fusion-simulations.d...ion-v1.0.10.7z

    This TFS sample mission demonstrating the use of

    Broadcasting messages <CBroadcast-v1.0.1.cs>
    Chat commands <CChatCommands-v1.0.4.cs>
    Rearm refuel
    Mission menu
    AI missions on demand
    Mission status, targets, goals, winning, duration
    Radar

    Quote Originally Posted by OBT~Polak View Post
    Hi all,

    In order to create a new, more immersive and realistic multiplayer campaign, I am looking for information to make messages appear to the pilots during a game, of course I don t know the script and the code unfortunately.
    I only copied and pasted a REFUEL AND REARM script which I added at the end of my .cs file for exemple.
    I'm only looking to display simple messages to start with, like SCRAMBLE or enemy aircraft located in a particular sector.
    How to send them to both camps or just one.

    Thanks to anyone who can help me in any way.

  10. Likes FTC_Rostic, OBT~Polak, Dawson liked this post
  11. #7
    Veteran Combat pilot
    Join Date
    Nov 2020
    Posts
    250
    Post Thanks / Like
    Total Downloaded
    1.53 MB

    Re: Message to players in the FMB

    Thanks you Ganix,

    I watch this when I get home

  12. #8
    Team Fusion TWC_Fatal_Error's Avatar
    Join Date
    Dec 2013
    Location
    Florida
    Posts
    686
    Post Thanks / Like
    Total Downloaded
    226.63 MB

    Re: Message to players in the FMB

    Ganix your link is not showing
    i7 2700 ,32 gigs, 4 ssd's ,1 7200rpm 2terabyte,1 samsung 55 display,2 mfd's, OPENTRACK,Warthog ,X55 stick, 7inch liliput monitor in mfd's 21 I-inc secondary display for instruments using virtual cockpit
    [*]iustus facere unus[*] JUST MAKE ONE ( FATAL ERROR) Commander TWC http://twcpilots.com

  13. #9
    Combat pilot FTC_Rostic's Avatar
    Join Date
    Nov 2023
    Posts
    143
    Post Thanks / Like
    Total Downloaded
    35.95 MB

    Re: Message to players in the FMB

    Quote Originally Posted by TWC_Fatal_Error View Post
    Ganix your link is not showing
    Strange... that link works for me. Try open this page that contain that link:
    https://www.team-fusion-simulations....ns/Multiplayer
    PC spec: Intel Core i7 8700K 3.7Ghz, DDR4 32Gb 2666Mhz, Asus Prime Z370-A, ADATA XPG SX8200 240Gb (PCIe Gen3x4), RTX 2060 6Gb
    Monitor: DELL P2717H (1920x1080:60Hz)
    Joystick: Android smartphone MonectPC app (virtual joystick driver)
    Hadtracker: Track IR 4 / No VR

    Enjoy multiplayer historical campaigns with Flying Tin Cans.
    Join us: https://flyingtincans.com —(•)— Discord —(•)— YouTube


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •