Jump to content

Load Unit Names Table At Mission Start


Wrecking Crew

Recommended Posts

v2.0

I have unit names:

{'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}

 

I want to replace:

if(contains({'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}, airborneUnitName)) then

 

With:

if(contains(<table_name>, airborneUnitName)) then

 

 

 

The following scripts depend upon Unit Names. How to create a global table at Mission Start for these values? How does this global table replace the unit names in below examples:

do
local function detectClientTakeoff(event)
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then
  local airborneUnitName = event.initiator:getName()
  trigger.action.outText(airborneUnitName .. ' just tookoff!', 5)
  if(contains([color="Purple"]{'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}[/color], airborneUnitName)) then
   trigger.action.setUserFlag(50003, true)
  end
 end
end
mist.addEventHandler(detectClientTakeoff)
end

 

 

mist.flagFunc.units_in_zones{ 
   units = [color="Purple"]{'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04','M-2000C 21', 'M-2000C 22', 'M-2000C 23', 'M-2000C 24', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}[/color], 
   zones = {'02 Boulder Zone'}, 
   flag = 90256, 
   toggle = true,    
}

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

You just make a new table and have it contain those strings.

 

myUnitNames = {'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}

if(contains(myUnitNames, airborneUnitName)) then

 

Its worth mentioning you can build a table pretty easily automatically instead of having to type out each unit name manually. Simply parse mist.DBs.humansByName table, perhaps search for certain coalition or unit type.

 

allF15C = {}

for uName, uData in pairs(mist.DBs.humansByName) do

if uData.type == 'F-15C' then

table.insert(allF15C, uName)

end

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

Link to comment
Share on other sites

That is my next question :-) You are getting ahead of me.

 

I do want this table of unit names to be available to multiple events Do Scrip actions, so that I have just the one table to edit. I will test this over the next week.

 

 

Thanks, Grimes.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

This is loading on an event once script:

 

aircraftClientNames= {'F-15C 01', 'F-15C 02', 'F-15C 03', 'F-15C 04', 'M-2000C 01', 'M-2000C 02', 'M-2000C 03', 'M-2000C 04', 'AJS37 Viggen 01', 'AJS37 Viggen 02', 'AJS37 Viggen 03', 'AJS37 Viggen 04'}

 

 

 

this works --

do
local function detectClientTakeoff(event)
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then
  local airborneUnitName = event.initiator:getName()
  trigger.action.outText(airborneUnitName .. ' just tookoff!', 5)
  if(contains([color="purple"]aircraftClientNames[/color], airborneUnitName)) then
   trigger.action.setUserFlag(50003, true)
  end
 end
end
mist.addEventHandler(detectClientTakeoff)
end

 

this does not; the flag 90256 is not going true --

mist.flagFunc.units_in_zones{ 
   [color="purple"]units = {(aircraftClientNames)},  -- I tried a couple times, how should this line look?[/color]
   zones = {'02 Boulder Zone'}, 
   flag = 90256, 
   toggle = true,    
}

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

    [color="purple"]units = aircraftClientNames, [/color]

 

Whenever you have a {} in lua that means a table. So you were creating a table within a table. So if you wrote out the contents of the table in a readable way it would have looked something like this:

 

units = {[1] = {'F-15C 01', 'F-15C 02', 'F-15C 03', ...},}

 

Units is a table and entry 1 contains another table that you created. Done via how I rewrote it above it would look something like this:

 

units = {'F-15C 01', 'F-15C 02', 'F-15C 03', ...}

 

Also for the sake of further explanation when you make a table like the allClientAircraft table you are making and you don't specify a table key for a given value, it will assume the entries are numerically indexed. If you were to print out the tables contents in full it'd look something like:

 

{

[1] = 'F-15C 01',

[2] = 'F-15C 02',

[3] = 'F-15C 03',

...

}

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

Link to comment
Share on other sites

What I needed is working now - thank you for the help.

 

You bring up the table elements, above, and I want to show that list, in a test/debug Radio F10 command for "Show Active Aircraft Clients". I have some outText examples to incorporate, like:

trigger.action.outText(table.concat(msg), 6)

 

Please, tell me how?

trigger.action.outText(aircraftClientNames.concat(msg), 6) -- ?

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

If you printed the contents of the aircraftClientNames table it would just give you a a list of the contents that you already defined. You basically need to build another table, adding each unit that is alive in the mission to the new table, then display said table.

 

First I'll explain what table concat does with regard to a message. Basically if every entry in the table is a string, you can combine them into a larger string. So take this example:

 

local msg = {}

msg[#msg+1] = 'Hello'

msg[#msg+1] = 'World'

 

table.concat(msg) would output: "HelloWorld"

Note there is no space between the two words. You can separate them either by adding another variable to the call like this, table.concat(msg, ';') or by inserting a string between the two.

 

BTW the msg[#msg+1] is basically the same as table.insert(msg, "Hello"). Think of it as saying "the size of the message table + 1, the entry will be = to x". You can use either really.

 

 

 

So for how that applies to checking if units are alive...

local msg = {}

for i = 1, #aircraftClientNames do

if Unit.getByName(aircraftClientNames) then

msg[#msg+1] = aircraftClientNames)

end

trigger.action.outText(table.concat(msg, ";"),6)

 

Note that check of Unit.getByName() works perfectly for clients, but you may need to add additional checks for AI. All that does is it checks if it can get the unit object for the unit... which can be done for dead AI. Clients are special in that they are completely "dont exist" when they aren't spawned in.

 

Also there is a handy tool within mist to explore the contents of a table. Specifically it is the function mist.utils.tableShow()

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

Link to comment
Share on other sites

Thank you, Grimes. My Visual Basic & SQL experience doesn't lend itself well to LUA.

 

What you described is similar to another text output I use, but I needed a basic primer on getting the table content. Clients are what I want to put into the table.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

How best to troubleshoot script changes?

 

I made good progress, but spend way too much time making a ME change and then Flying the mission. I used Ian's Witchcraft to test code in v1.5, and this is v2 I'm talking about. Is there a LUA shell, or should I use Witchcraft?

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

  • 3 weeks later...

The aircraftClientNames table is being loaded with the names of all the defined Clients. The aircraftClientNames table is used successfully in the detectClientTakeoff code that is discussed above.

 

This MIST function code is not working --

mist.flagFunc.units_in_zones{ 
   units = [color="blue"]aircraftClientNames[/color], 
   -- units = {'F-15C 01', 'M-2000C 01', 'AJS37 Viggen 01'}, 
   zones = {'08 Highway Zone'}, 
   flag = 90856, 
   toggle = true,    
}

 

In the above code, I can comment out the --

units = aircraftClientNames,

and uncomment this and it works --

units = {'F-15C 01', 'M-2000C 01', 'AJS37 Viggen 01'},

 

How to get this to work? The mission is attached.

units = aircraftClientNames,

Mission Template 20N0p.miz

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

It is down to how you are calling the appendAircraftName function. You have added it to an event handler and no events are occurring between the time it was added and when you run the mist.flagFunc.units_in_zones function. So the units_in_zones function is just getting the default list of units. This is how I modified it to just run right then and there.

 

do
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 for uName, uData in pairs(mist.DBs.humansByName) do
  if uData.type == 'F-15C' or uData.type == 'AJS37' or uData.type == 'M-2000C' or uData.type == 'MiG-21Bis' then
   if not (contains(aircraftClientNames, uName)) then
    table.insert(aircraftClientNames, uName)
   end
  end
 end
end

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

Link to comment
Share on other sites

So the units_in_zones function is just getting the default list of units.

 

My aircraft is in the default list of units, F-15C 01.

 

--

 

There is a Radio F10 option to display the aircraftClientNames content. After I takeoff in my F-15C, I run that Radio command and the result is a display of all the existing a/c units in the mission with Skill = Client and uData.type =

 if uData.type == 'F-15C' or uData.type == 'AJS37' or uData.type == 'M-2000C' or uData.type == 'MiG-21Bis' then

 

My F-15C's Pilot Name 'F-15C 01' is listed in this result. The detectClientTakeoff code works with the aircraftClientNames properly, but the Mist function does not.

 

 

1. The table aircraftClientNames picks up all the Clients that are defined in the mission, even before an actual Client joins in one of those slots. My F-15C Client unit's name, F-15C 01, is in the table when I display its content after takeoff using the Radio F10 menu.

2. At the moment of takeoff, the detectClientTakeoff script works correctly, and this message is displayed:

trigger.action.outText(airborneUnitName .. ' just tookoff!', 5)

, with 'F-15C 01' as the airborneUnitName

3. The Mist function doesn't work when I replace the verbatim unit names with the table name.

 

The Mist function does not recognize my Unit Name, F-15C 01, from the aircraftClientNames table, like the detectClientTakeoff function does. Why doesn't the Mist 'mist.flagFunc.units_in_zones{' pick up the content of the aircraftClientNames table?

 

this detectClientTakeoff works --

do
local function detectClientTakeoff(event)
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then
  local airborneUnitName = event.initiator:getName()
  trigger.action.outText(airborneUnitName .. ' just tookoff!', 5)
  if(contains([color="purple"]aircraftClientNames[/color], airborneUnitName)) then
   trigger.action.setUserFlag(50003, true)
  end
 end
end
mist.addEventHandler(detectClientTakeoff)
end

 

this does not; the flag 90256 is not going true --

mist.flagFunc.units_in_zones{ 
   [color="purple"]units = aircraftClientNames,[/color]
   zones = {'02 Boulder Zone'}, 
   flag = 90256, 
   toggle = true,    
}

Mission Template 20N0p.miz

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

The Mist function does not recognize my Unit Name, F-15C 01, from the aircraftClientNames table, like the detectClientTakeoff function does. Why doesn't the Mist 'mist.flagFunc.units_in_zones{' pick up the content of the aircraftClientNames table?

 

The aircraftClientNames table likely isn't being updated by the time the mist.flagFunc is called, so it is simply using the default aircraftClientNames table. So in other words it won't update the list of units.

 

What I think is happening...

 

At 3 seconds you add the appendAircraftClientNames function to an event handler. This means that when any event occurs from that point on, this function will be run.

 

At 12 seconds you run mist.flagFunc.units_in_zones() with the aircraftClientNames table listed. If no event occurs between 3 and 12 seconds, then the table won't change at all. If an event does occur in that time-frame then it should be up to date.

 

The take-off event is always able to look at the "live" table of aircraftClientNames, while the flagFunc is looking at what that table looked like when the function was first called.

 

I attached a version with my modification from my previous post. In short that appendAircraftClientNames function DOES NOT need to be on an event handler. It should only be run once because client aircraft cannot be added or removed from a given mission, therefore if you create the table once at the start of the mission that table will always be accurate.

Mission Template 20N0p_mod.miz

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

Link to comment
Share on other sites

OK! Thanks, I was just about to post again and I saw this ^^^. I appreciate your testing it. I'll take a look tonight.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

Good progress. I will look into the issue later this week.

 

Good: My F-15C 01 Client is now detected in the close-in Highway Zone, using the regular Mist function. I can fly over that highway junction repeatedly and see the 'detected' message each time.

I am also detected when taking off in the detectClientTakeoff function.

 

Issue: As soon as I takeoff, and as soon as my wingman takes off, we each get the message that a Blue jet flew over Boulder Dam. Then when I fly over the Boulder Dam I get no message.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

If you are using my save file of it, I moved the zone to test it because I didn't want to spend the time flying over there.

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

Link to comment
Share on other sites

LOL, I hadn't noticed! That's why I made the much closer Highway Zone. I've prolly flown out to that damn dam a hundred times now. When I looked at the code events last night I saw no reason why the Boulder Dam event triggered at the takeoff.

 

attachment.php?attachmentid=161383&stc=1&d=1493251589

Screen_170224_200859.thumb.jpg.3888d3a684a40d8abb13a7bd4748c9b3.jpg


Edited by Wrecking Crew

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

  • 1 year later...
At the moment of takeoff, the detectClientTakeoff script works correctly, and this message is displayed:

Code:

(.. trigger.action.outText('Blue Client ' .. airborneUnitName .. ' just tookoff!', 5)

 

This ^^^ script has been working well. The text output contains the client Pilot Name, like "F-15C 01". This value is assigned in the Mission Editor for the Unit within its Airplane Group - see the green arrow in the screenshot. The complete code is also attached.

 

I need a little bit more help with this. I want to include two more values in the text output, but I don't see these values in the S_EVENT_TAKEOFF data or in the mist.DBs.humansByName table.

The values are:

  1. The Client's handle, like "Wrecking Crew".
  2. The Callsign, like "Dodge 1-1" in the screenshot at the blue arrow.

 

The result would be in the text out, something like this:

trigger.action.outText('Blue Client ' ..clientHandle.. ' in ' .. airborneUnitName .. ', Callsign ' ..unitCallsign.. ' just tookoff!', 5)

And would look like:

Blue Client Wrecking Crew in F-15C 01, Callsign Dodge 1-1 just tookoff!

 

My questions:

Where do I get "Wrecking Crew" and "Dodge 1-1"?

And how to link those to what I know which is the "F-15C 01" unitName?

 

attachment.php?attachmentid=200994&stc=1&d=1546199716

546345620_Screen_181230_12402102.png.f94edef88c61d9023065bbd942e912c1.png

Blue Sky Scripts.lua

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

Unit.getPlayerName()

 

Unit.getCallsign()

 

Worth noting that getPlayerName() only returns the pilots name, so multicrew aircraft like the F-14, L-39, or Gazelle won't have information for the guy in the 2nd seat.

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

Link to comment
Share on other sites

For reference, the workflow I use to troubleshoot code is that I save the script I'm working in a .lua file in a directory I created for this purpose, and instead of using "DO SCRIPT FILE" I use a DO SCRIPT, and use the assert command to open it. That way, every time I make a change to the file I can just press LSHIFT+R to restart the mission, and it will load the modified version every time. Makes scripting and order of magnitude faster. (or more if you're bad at scripting like I am)

Anyway, the script in the ME will look something like this:

assert(loadfile("C:\\Users\\xx\\Saved Games\\DCS.openbeta\\Missions\\Scripts\\xx_Script.lua"))()

 

Note that in lua you need double black-slashes as a single backslash is seen as an operator, even inside of a string.

Link to comment
Share on other sites

Thank you Wrench,

That is a good technique. My events are based upon a client takeoff event. It is really quite specific in this case to the particular client who takes off.

 

In any case, I really do not know how to join these two attributes to the uName I have :-) I've had my head stuck in some other code recently, but will get to adding these Client Name & Callsign values in soon.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

This is the result. Thank you Wes for the help to add the Player Name & Callsign to the code. And thank you Grimes, for always being there with answers.

 

-- new, detect Client Takeoff with names, etc...
do
local function detectClientTakeoff(event)
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 if(event.id == world.event.S_EVENT_TAKEOFF and event.initiator) then
  local airborneUnitName = event.initiator:getName()
[color="SeaGreen"]   local airbornePlayerName = event.initiator:getPlayerName() --Added Variable to store PlayerName. Note: This is the account name, not the MP Nickname.
  local callsign = event.initiator:getCallsign() --Added Variable to store the Callsign. Note: The dash for "1-1" isn't in this function.
  local airborneCallsign = string.sub(callsign, 1, string.len(callsign)-2) .. ' ' .. string.sub(callsign, string.len(callsign)-1, string.len(callsign)-1) .. '-' .. string.sub(callsign, string.len(callsign))
  --Modified the above line to add the space and dash back with string manipulation. Dodge11 -> Dodge 1-1[/color]
  if(contains(aircraftClientRedNames, airborneUnitName)) then
   trigger.action.setUserFlag(10008, true)
   trigger.action.outText('Red pilot ' .. airbornePlayerName .. ', callsign: ' .. airborneCallsign .. ' just tookoff in ' .. airborneUnitName .. '!', 5)
--Modified the above line to include the new variable, and reformmatted it to something quicker to read.
  end
  if(contains(aircraftClientBlueNames, airborneUnitName)) then
   trigger.action.setUserFlag(50008, true)
   trigger.action.outText('Blue pilot ' .. airbornePlayerName .. ', callsign: ' .. airborneCallsign .. ' just tookoff in ' .. airborneUnitName .. '!', 5)
--Modified the above line to include the new variable, and reformmatted it to something quicker to read.
  end
 end
end
mist.addEventHandler(detectClientTakeoff)
end

 

This returns like:

Blue pilot Wrecking Crew, callsign: Enfield 1-1 just tookoff in F-15C 01.

 

Flag 5008 is set True and triggers mission activity to begin. This is for multiplayer missions so that a mission can advance in time until a client shows up and takes off. All of the activity that I want to have happen when clients are in the mission are delayed, but the time of day will advance normally, without the mission being paused.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

  • 2 months later...

Worth noting that getPlayerName() only returns the pilots name, so multicrew aircraft like the F-14, L-39, or Gazelle won't have information for the guy in the 2nd seat.

Well, if only that were true. In case of the F-14B getPlayerName() returns the name of the RIO once he enters. When he leaves, it returns an empty string even when the pilot slot is still occupied :(

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

  • 1 month later...
Well, if only that were true. In case of the F-14B getPlayerName() returns the name of the RIO once he enters. When he leaves, it returns an empty string even when the pilot slot is still occupied :(

I just did some testing with the Tomcat and getPlayerName() with different results:

 

Host as pilot: returns host name

Client as pilot: returns client name

Host as pilot and client as RIO: returns host name

Client as pilot and Host as RIO: returns Nil :(


Edited by QuiGon

Intel i7-12700K @ 8x5GHz+4x3.8GHz + 32 GB DDR5 RAM + Nvidia Geforce RTX 2080 (8 GB VRAM) + M.2 SSD + Windows 10 64Bit

 

DCS Panavia Tornado (IDS) really needs to be a thing!

 

Tornado3 small.jpg

Link to comment
Share on other sites

I just did some testing with the Tomcat and getPlayerName() with different results:

 

Host as pilot: returns host name

Client as pilot: returns client name

Host as pilot and client as RIO: returns host name

Client as pilot and Host as RIO: returns Nil :(

Yeah, tried to report it some time ago here https://forums.eagle.ru/showthread.php?t=235628

Looks like they did not fix it yet unfortunately as the function is an important workaround for me and others because of another DCS bug :(

 

E: But I was not aware that there are even more combinations depending on host and client - sigh!


Edited by funkyfranky

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

  • Recently Browsing   0 members

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