Talk:currentWeapon

From Bohemia Interactive Community
Jump to navigation Jump to search

currentWeapon == ""

Posted on October 2, 2015 - 04:28 (UTC)
Pierre MGI
Place a non-armed vehicle in your group. Ask for currentWeapon (driver vehicle) (in a loop with cursortarget for example). There is no result. Make the driver disembark. The man has a weapon and this command starts to work (the AI unit is also is own driver). Make this AI jump into the vehicle. Now, the info of current weapon of the driver is persistent. There is no way, on my knowledge to easily check if an embarked unit has a weapon until this unit jump out / into a vehicle. Further more, if you check and empty the subordinate inventory (selected unit then 6 and scroll until open subordinate's inventory, currentWeapon will return the weapon in unit's hands, then "throw" for grenades and even chemlight, then nothing when emptied inventory, then binocular if you fill it with binocular only, and so on. The concept of weapon is far too broad!

First of all this is true for any vehicle placed in editor with crew, doesn't have to be unarmed. The unit moved in a vehicle immediately before it could select weapon. If you want to force units having weapons in vehicles driver tank selectweapon primaryweapon driver tank, now the driver has weapon. Simples. Killzone Kid (talk) 10:20, 2 October 2015 (CEST)