cfrag Posted May 7, 2021 Share Posted May 7, 2021 I'm trying to write a short script that will log the names of everyone aboard a multicrew craft (UH-1) when a certain event happens (usually take-off and landing, so I can see who survived, and tally their scores). Now, what I thought to be quite simple turned out to be a fool's errand: there seems to be no way for me to determine any crew's names other than the one who is controlling the unit: coalition.getPlayers() returns the UNITS that are controlled by players, no player object (that seemingly does not exist) unit.getPlayerName() returns the name of the player who controls the unit, no-one else So, is there any other way I can determine who is aboard the unit, or are all players who do not control a unit invisible from the standpoint of the game? Is there perhaps a player API that I'm not aware of? Thanks for any pointers, -ch Link to comment Share on other sites More sharing options...
Grimm Posted January 25, 2023 Share Posted January 25, 2023 I'm just trying to figure this one out as well. What did you end up doing @cfrag? Splash Damage 2.0: Make explosions better! RotorOps: Helicopter Mission Generator Link to comment Share on other sites More sharing options...
Los Posted January 25, 2023 Share Posted January 25, 2023 DML should be your friend, see near the top of the mission editor forum and study that, it has player scoring. Los Link to comment Share on other sites More sharing options...
cfrag Posted January 25, 2023 Author Share Posted January 25, 2023 3 hours ago, Grimm said: What did you end up doing From all that I know it's currently impossible to find players that are multi-crewing as non-PIC while the mission is running. I'm hoping that future changes to DCS will make that information available. As it stands right now, not even a forthcoming 'addCommandForUnit()' will be able to resolve that - we need an additional field in the event table for the player_enter_unit table that tells us which station, plus changes to the API for getPlayer() and getPlayerName() 3 hours ago, Los said: DML should be your friend DML is you friend - but it can't (yet) perform miracles. The playerScore module keeps track of all players, but - due to the issue I'm still trying to resolve - awards a score/feat only to that player who is in control. A non-controlling crewing player (let's say gunner or co-pilot in a Huey) will currently not receive any awards, just the pilot. Link to comment Share on other sites More sharing options...
Recommended Posts