FlightControl Posted May 27, 2017 Posted May 27, 2017 (edited) There seems to be a (new) problem in Single Player with CA. I remember that when i joined CA units using ALT-J, I could retrieve the "player name" of that unit, which used to be "killer". That seems to have stopped working too ... <dissapointed> Run the attached mission. There are 2 airplane slots and a 2 command slots. Suggest you do the following actions: 1. Join an airplane slot. You'll see the "player name" appearing who is in the slot. 2. Join now a CA unit from the map using ALT-J. The "name" of the player does not appear. The mission runs in continuous trigger mode the following code (thus every second). function ShowPlayers() local CoalitionsData = { AlivePlayersRed = coalition.getPlayers( coalition.side.RED ), AlivePlayersBlue = coalition.getPlayers( coalition.side.BLUE ) } for CoalitionId, CoalitionData in pairs( CoalitionsData ) do for UnitId, UnitData in pairs( CoalitionData ) do if UnitData and UnitData:isExist() then local UnitName = UnitData:getName() local PlayerName = UnitData:getPlayerName() trigger.action.outText( PlayerName .. " in " .. UnitName, 5 ) end end end end Can somebody please have a look at this problem and check if this needs to be reported or not? There is currently no way to test in DCS when a player has joined a CA unit or not. Not in Single Player Mode, not in Multiple Player Mode ... The problem seems to be with the API coalition.getPlayers( coalition.side ). This API does not return the players that have joined a CA unit :-( May I take the freedom to say this is a problem :-) ? thanks in advance for checking, SvenBUG-002 - coalition.getPlayerNames for CA not working.mizBUG-002 - coalition.getPlayerNames for CA not working.lua Edited May 27, 2017 by FlightControl [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]
Recommended Posts