Zriel 12 Posted July 9, 2015 (edited) So...I'm trying to get the Gunner posistions of say, the UH80. But emptypositions "gunner" (https://community.bistudio.com/wiki/emptyPositions) returns 1. Odd. Even having the AI mount into de given 2 positions, still I get 1 when empty, 0 when 1 mounted, and 0 again for the 2 mounted. I I make the first one dissembark, It still returns 0. Quite odd. Anyone knows about this? Maybe it is not a Gunner position? Anyone has a working script or function that returns the avaliable gunner positions for a vehicle? EDIT: so, here https://community.bistudio.com/wiki/moveInTurret you can get some sripts to find the turrets of a given vehicle, which may work (will need to test it later) But still, it is odd that emptypositions only returns one. Thanks! Edited July 9, 2015 by Zriel Found some scripts Share this post Link to post Share on other sites
killzone_kid 1331 Posted July 9, 2015 use isNull (heli turretUnit [turretpath]) Share this post Link to post Share on other sites
Zriel 12 Posted July 9, 2015 use isNull (heli turretUnit [turretpath]) ?? My idea was more like: A) Find the avaliable Gunner positions in a vehicle using the "emptypositions" command (1,2) B)Spawn n number of crew for the vehicle C) Moveingunner the crew into the vehicle. I do not really understand how your code can help in finding the number of gunner positions in a given vehicle KK. Must say vehicle is empty BTW. Share this post Link to post Share on other sites
killzone_kid 1331 Posted July 9, 2015 "gunner" is unreliable and so is "commander" in any vehicle you have 1 driver n turrets n cargo Find vehicle turrets, then check if desired turret is occupied. Commands you will need allTurrets turretUnit weaponsTurret Share this post Link to post Share on other sites
SilentSpike 84 Posted July 9, 2015 ^ That allTurrets command is exactly what you need, it's saved my brain in the past when trying to do something similar. Scripting with vehicles and their passengers/crew can be painfully contrived in arma (especially with locality involved too). { _u = _grp createUnit [etc.]; _u moveInTurret _vehicle; } forEach (allTurrets _vehicle) Share this post Link to post Share on other sites
Zriel 12 Posted July 10, 2015 Thanks both. I was starting to learn the turrets configuration, but I hadn't seen the allturrets command. Yay! Share this post Link to post Share on other sites
whiztler 137 Posted July 12, 2015 Strange that the commander position is not seen as a turret (Slammer UP): _turretPath = allTurrets [TestVeh, false]; {TestVeh lockTurret [_x, true]} forEach _turretPath; This locks the gunner turret but not the commander turret Share this post Link to post Share on other sites
killzone_kid 1331 Posted July 12, 2015 Strange that the commander position is not seen as a turret (Slammer UP): _turretPath = allTurrets [TestVeh, false]; {TestVeh lockTurret [_x, true]} forEach _turretPath; This locks the gunner turret but not the commander turret Good catch http://feedback.arma3.com/view.php?id=24762 Share this post Link to post Share on other sites
whiztler 137 Posted July 12, 2015 (edited) Quick question, I am trying to put together a crewcheck script that checks if players are authorized to operate a certain vehicle. Since the 'normal' checks for commander and gunner no longer work in ARMA3 one has to check for turret positions. The getIn EH checks for positions with in the vehicle. All good till now. When players enter the vehicle as cargo the EH spawns a loop that checks of players switch from cargo to a crew position (driver/turret). Here's where things get dicy for me: The current cargo position is stored: _ADF_CC_cargoIdx = _ADF_CC_object getCargoIndex _ADF_CC_unit; The the loop is started to check if player switches to a crew position. If the script detects the player switches to a crew position, the player is notified and the script needs to move the player back into the cargo position it moved from initially. The notification is shown but I cannot move the _ADF_CC_unit back into the cargo position: _ADF_CC_unit assignAsCargoIndex [_ADF_CC_object,_ADF_CC_cargoIdx]; _ADF_CC_unit moveInCargo [_ADF_CC_object,_ADF_CC_cargoIdx]; Edit, vehicle is moving, not that it should matter Tested with both gunner and commander turret. What am I missing here? Edit2: Solved with _ADF_CC_unit action ["moveToCargo", _ADF_CC_object, _ADF_CC_cargoIdx]; Edited July 14, 2015 by whiztler solved Share this post Link to post Share on other sites