Llano 11 Posted October 24, 2013 Hello! If a player is having a laserpointer at the current weapon, and i run this code _weaponClass = currentWeapon player; what will it return? For example, a MXM rifle (without any attachment) classname is "arifle_MXM_F", but with a laserpointer attached it is "arifle_MXM_Hamr_pointer_F". How do i only retrieve the classname without any attachment on? Thanks. Share this post Link to post Share on other sites
Llano 11 Posted October 25, 2013 After playing around in the editor, i find that if i spawn with a MXM rifle equipt with a laser pointer, it returns "arifle_MXM_Hamr_pointer_F", but if i remove the laser pointer, it still returns "arifle_MXM_Hamr_pointer_F". Weird? Share this post Link to post Share on other sites
profcupcake 11 Posted October 25, 2013 It technically counts as a separate weapon to the unmodified version. The only difference, though, is the pre-attached attachments (obviously). However, removing these will not change what the weapon is (that would be akin to an MXM suddenly turning into a Katiba). I hope that helps explain it. Share this post Link to post Share on other sites
Llano 11 Posted October 25, 2013 It technically counts as a separate weapon to the unmodified version. The only difference, though, is the pre-attached attachments (obviously). However, removing these will not change what the weapon is (that would be akin to an MXM suddenly turning into a Katiba). I hope that helps explain it. Aha, alright i see. Thanks for the explanation. Is any chance that i can get the unmodified version classname of that weapon? For example, if i have equipt a MXM with laser pointer it will return arifle_MXM_F? Share this post Link to post Share on other sites
profcupcake 11 Posted October 25, 2013 Aha, alright i see. Thanks for the explanation.Is any chance that i can get the unmodified version classname of that weapon? For example, if i have equipt a MXM with laser pointer it will return arifle_MXM_F? Only if it was originally created as the base arifle_MXM_F, then the laser pointer added afterwards. Either that, or you could try experimenting with string handling (but I wouldn't recommend that). Share this post Link to post Share on other sites
Llano 11 Posted October 25, 2013 Only if it was originally created as the base arifle_MXM_F, then the laser pointer added afterwards. Either that, or you could try experimenting with string handling (but I wouldn't recommend that). Aha, i see. So aslong i spawn the weapons without any attachment, i will get the unmodified version? Hm, that might work for me. Thanks :) Share this post Link to post Share on other sites
profcupcake 11 Posted October 25, 2013 You also may be interested in the following commands: http://community.bistudio.com/wiki/addPrimaryWeaponItem http://community.bistudio.com/wiki/addSecondaryWeaponItem http://community.bistudio.com/wiki/primaryWeaponItems http://community.bistudio.com/wiki/secondaryWeaponItems http://community.bistudio.com/wiki/removePrimaryWeaponItem And a bunch of others with similar names, that would probably be much easier to find if the Biki wasn't such a mess. Although this list might help: http://community.bistudio.com/wiki/Category:Arma_3:_New_Scripting_Commands_List Share this post Link to post Share on other sites