Shahdoh Posted October 26, 2013 Share Posted October 26, 2013 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 Link to comment Share on other sites More sharing options...
Grimes Posted October 26, 2013 Share Posted October 26, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Shahdoh Posted October 26, 2013 Author Share Posted October 26, 2013 Can the unit names be a variable? Thats what I am trying to do. Link to comment Share on other sites More sharing options...
Grimes Posted October 26, 2013 Share Posted October 26, 2013 It should be ok, as long as it is a string of an existing units name. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Shahdoh Posted October 26, 2013 Author Share Posted October 26, 2013 Thanks, got it working, found that I was trying to use the group name instead of the unit name. Changed the variable and its working now. Link to comment Share on other sites More sharing options...
Cougar Posted November 12, 2013 Share Posted November 12, 2013 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... Link to comment Share on other sites More sharing options...
Grimes Posted November 12, 2013 Share Posted November 12, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Cougar Posted November 12, 2013 Share Posted November 12, 2013 (edited) Well I was flying the unit itself but no joy grrrr Ill keep trying :) Edited November 12, 2013 by Cougar Link to comment Share on other sites More sharing options...
Cougar Posted November 12, 2013 Share Posted November 12, 2013 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.... Link to comment Share on other sites More sharing options...
Cougar Posted November 12, 2013 Share Posted November 12, 2013 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.... Link to comment Share on other sites More sharing options...
Grimes Posted November 13, 2013 Share Posted November 13, 2013 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. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
Cougar Posted November 13, 2013 Share Posted November 13, 2013 Thx Bro Link to comment Share on other sites More sharing options...
Cougar Posted November 13, 2013 Share Posted November 13, 2013 Hotfix works like a charm Rep inbound :) Link to comment Share on other sites More sharing options...
wolle Posted November 21, 2013 Share Posted November 21, 2013 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 Link to comment Share on other sites More sharing options...
Grimes Posted November 21, 2013 Share Posted November 21, 2013 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 Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
mwd2 Posted November 30, 2013 Share Posted November 30, 2013 is it possible to display the message in different parts of the screen, or ony in the upper right corner? Playing: F-16C Intel i7-13700KF, 64GB DDR5 @5600MHz, RTX 4080 ZOTAC Trinity, WIN 11 64Bit Prof. Squadron "Serious Uglies" / Discord-Server: https://discord.gg/2WccwBh Ghost0815 Link to comment Share on other sites More sharing options...
Grimes Posted November 30, 2013 Share Posted November 30, 2013 Nope. Its been on the wishlist for a while now. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
FlightControl Posted February 7, 2014 Share Posted February 7, 2014 Ok. Found myself searching for hours on this one. Trying it out right now ... Sven [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE] Link to comment Share on other sites More sharing options...
Recommended Posts