Jump to content

Recommended Posts

Posted

I have been working on a series of MP missions for myself and the squadron I fly with, which will often include a person using LOTATC. In short what I am trying to do is have it so that when a certain trigger is fired then a message similar to the will appear that is visible only to the person in the gamemaster slot similar to the "message to all" option in the triggers. Is this possible to do and if so how do you set it up?

Screen_240408_131146.jpg

Posted (edited)
On 4/8/2024 at 6:04 PM, Caveman655 said:

All but useless honestly, scripting is not something I have ever really used. But I'll jump into that link you posted and see if I can figure it out. Thanks.

As a rough guide, you'd probably need to write a script that:

continuously polls the net.get_player_list() to see who's connected. Cross check those players with net.get_player_info() and net.get_player_slot() to find the player in the games master slot. Then you can stop the polling.

Then when you have that playerID of the GamesMaster/GCI player.

 

 

ETA: 

These 'controller' roles do not interact with the DCS Scripting Engine at all. So they have no unit, no group and do not trigger a BIRTH or ENTER / LEAVE events.

This means, unfortunately, all communication with them will have to be done through the net singleton and as such you will need a lua script with a public API you can access from the mission editor so you can send messages to any of these roles. 

END EDIT

 

 

Then you'll need a public API function that you can call from within the DO SCRIPT action on a trigger in the ME that you can send your message string to for it to show to the unit(or group) with trigger.action.outTextForUnit(). 

Without actually coding it that's the best overview I can give you. 

 

You *might* want to think about solving your problem another way?

 

ETA:

E.g. Play a sound file that has a human voice saying a 'code' and give the Game Master a cypher so that they can hear the code and read what it means - other players won't have any idea. 

Edited by Elphaba
Updated information
Posted

Okay, I've not heard from you, but I've put a few hours into this for poops and giggles.

Without having to resort to Hooking the server or anything, just from the DCS Scripting Environment, I'm now able to identify the Games Master (or any of the controller) slots, and I am able to send a message to that player but it appears in the CHAT WINDOW.

As I'm all by my lonesome, I'm not able to test with a group of people if that message ONLY appears *which it should* to the Games Master, or if it appears for everyone *which it shouldn't*.

If you want to test this out, let me know. I have a dedicated server to test this with. 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...