juleshuxley 9 Posted October 2, 2020 When a player is in the driving position in a vehicle, it's easy to find out that he is the driver: // assuming player is in driving seat assignedVehicleRole player; // returns "driver" However, when you're the commander or gunner you get an array that's the "turret path" of what turret you're in: // assuming player is in commanding turret (assignedVehicleRole player) select 1; // returns [0,0] often, but the commander turret can vary depending on vehicle, especially modded vehicles If the commanding turret were always [0,0] I could use that to detect if the player is in the commanding position. However sometimes it's [0,1], and on modded vehicles it can [5] or [6]. I thought that (allTurrets [_this, true]) select 1// [[0],[0,0]] might have been the answer. That the last entry in the array it returns was always the commanding turret. This is not the case, again, often not on modded vehicles. Basically I'm about to go ahead and hard code every single vehicle name in my script with a reference to which turret path is the commanding position. However, before I do that, is there a cleverer way to find out if the player is in the commanding position? The moveInCommander command always moves the player to the commanding position, so there must be a way to query the vehicle and for it to give the commanding position / commanding turret path, right? Share this post Link to post Share on other sites
RCA3 593 Posted October 3, 2020 @juleshuxley, Same example on these two commands, try it out: https://community.bistudio.com/wiki/objectParent Example 4 https://community.bistudio.com/wiki/commander Example 2 _isVehicleCommander = player isEqualTo commander objectParent player; Share this post Link to post Share on other sites