exil Posted September 4, 2022 Posted September 4, 2022 Gents, is there any way I could identify a playerID or Group when the player presses one f10 menu button? I'm thinking of something like: F10 Command "check in" and once the player presses the F10 menu "check in" I could retrieve player data like his ID or his group/unit name. Any help is highly appreciated! GeForce RTX 4090 Founders Edition - AMD Ryzen 7 5800X3D - 64Gb RAM - Win11 - HP Reverb G1 - Thrustmaster Warthog HOTAS (40cm extension) - VKB Sim T-Rudder MKIV Pedals
toutenglisse Posted September 4, 2022 Posted September 4, 2022 @exil yes, as long as your radio items are created at the group level (no addSubMenu or addCommand for all or coalition), you just have to add to associated function's arguments the groupname, groupID, whatever. But nothing exists at the unit level. Ex : missionCommands.addCommandForGroup(GroupId, 'Guns only, defensive', _1v2Path, _DogFight, GroupName, GroupId, GroupCoal, GroupType, GroupBaseC, GroupBaseP, TKName, AWName, WMFreqVal, 2, 2, 2) Inside the function called by the command, you can add lines to, for example, add to a table a new entry with time, function name, and all datas you need relative to the group that triggered execution of it. Or trigger a message with these datas... 1
exil Posted September 4, 2022 Author Posted September 4, 2022 (edited) 9 minutes ago, toutenglisse said: @exil yes, as long as your radio items are created at the group level (no addSubMenu or addCommand for all or coalition), you just have to add to associated function's arguments the groupname, groupID, whatever. But nothing exists at the unit level. Ex : missionCommands.addCommandForGroup(GroupId, 'Guns only, defensive', _1v2Path, _DogFight, GroupName, GroupId, GroupCoal, GroupType, GroupBaseC, GroupBaseP, TKName, AWName, WMFreqVal, 2, 2, 2) Inside the function called by the command, you can add lines to, for example, add to a table a new entry with time, function name, and all datas you need relative to the group that triggered execution of it. Or trigger a message with these datas... Thank you very much! Exactly what I was looking for! I'll work around the unit level by setting up a new group for each player aircraft. But this opens up a whole new level for scripting! Just have to go on and learn how to handle function args a bit better. But the basic principle is understood. Edited September 4, 2022 by exil GeForce RTX 4090 Founders Edition - AMD Ryzen 7 5800X3D - 64Gb RAM - Win11 - HP Reverb G1 - Thrustmaster Warthog HOTAS (40cm extension) - VKB Sim T-Rudder MKIV Pedals
Recommended Posts