Jump to content

Recommended Posts

Posted

I have the following outtext message for a specific group that works:

trigger.action.outTextForGroup(Group.getByName(unit.gname).id_, text, 10)

 

but I am trying to change it to the mist.message.add so I can mix messages to everyone and also to specific units without it overwriting each other. The

msg.msgFor = {coa = {'all'}}

is working just fine, Its the msgfor to the specific group that I can not get to work, no errors, just nothing shows.

 

msg.msgFor = {units = {Group.getByName(unit.gname).id_}}

 

Wondering if its because I am mixing messages to all and a specific group or some formatting error with the group msgfor.

 

Thanks,

Shahdoh

Posted

It accepts unit names.

 

local msg = {}

msg.text = 'Pilots!!!'

msg.displayTime = 15

msg.msgFor = { units = {'Pilot #1', 'Pilot #5'}}

 

mist.message.add(msg)

 

http://wiki.hoggit.us/view/MessageAdd

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 3 weeks later...
Posted

Trying to play arround with mist.message but no matter what trying to use msg.msgfor = { units = { 'Hawg11', 'Hawg12' } } doesnt show the message Pilot name or even group name....

CA = blue send the message to any unit and not only CA vehicles...

 

I must be doing something wrong...

sigpic4165_1.gif

attachment.php?attachmentid=36435&d=1266786388

Posted

You have to be currently flying in either of those units to see the message they are receiving.

 

I had to do a bit of a work-around for Combined Arms and messages. Combined Arms players don't belong to a group and therefore only receive messages to all or coalition. The message system was setup in such a way that each player can receive a custom and unique message, so I am using trigger.action.outTextForGroup for each client aircraft, but a split second earlier it does a trigger.action.outTextForCoalition. The message to coalition is displayed for all players on that coalition, thus CA players can receive messages, by using outTextForGroup a split second later it should overwrite the display of the message to Coalition. CA players don't receive that extra message.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Ok that's weird....Ive created a new mission with only a plane with one of the units name and its working......I wonder is my other mission is broken....

sigpic4165_1.gif

attachment.php?attachmentid=36435&d=1266786388

Posted

Alright I think I've worked it out.... Msg to units which are planes for now works.....but they need to be added first to the mission, as soon you put a ground units then it doesnt work if you add more planes and try to send msgs.... but the first planes added will receive the msgs.

 

Like I said thats weird as coa works but not units....

sigpic4165_1.gif

attachment.php?attachmentid=36435&d=1266786388

Posted

Indeed that is weird. I reproduced it and I figured out the problem... Its mostly down to my failure of properly set up all of the possibilities in my test mission I used for messages and not realizing something pretty obvious. I simply didn't add a group of more than 1 unit, thus the unitId and groupId matched up perfectly. This is an issue because the outTextForGroup uses groupId and I didn't realize I was using unitId. It'll be fixed in the next release of mist. I already have some code merged in for the next release so a hotfix might be more annoying than just finishing what I was working on.

 

To fix it with mist 3.2 go to line 3676, 3683, 3687, and 3689 and change clientId to clientData.groupId.

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

message.add only for tuned-in units

 

It would be very useful to have an option when using the mist messaging system that messages would be only received by units that are tuned into a certain frequency, just like for RL radio traffic.

 

Or is that already possible?

[sIGPIC][/sIGPIC]

 

Intel Core I7 4820K @4.3 GHz, Asus P9X79 motherboard, 16 GB RAM @ 933 MHz, NVidia GTX 1070 with 8 GB VRAM, Windows 10 Pro

Posted

Its possible, but not for mist. That data is accessible in the export lua environment but not the mission scripting environment. For instance TARS has access to the data so thats how it allows players to communicate only when on the same frequency. MIST and all mission scrips don't have access to the required data.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • 2 weeks later...
Posted

is it possible to display the message in different parts of the screen, or ony in the upper right corner?

Playing: DCS World

Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof.

Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh

Ghost0815

  • 2 months later...
  • Recently Browsing   0 members

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