madrussian 347 Posted May 14, 2021 Apparently (based on some quick tests in the editor) a unit and his weapon are different objects. On VR map, I shot a bunch of rays though a Loon using lineIntersectsSurfaces and examined the results, which looked like this: In this case (per lineIntersectsSurfaces), the man is Loon and his weapon is "NOID cup_famas_f1_rail.pd3". (Again as far as I can tell, separate & distinct objects.) The question is: How can we get this weapon object? (without using raycast commands like lineIntersectsSurfaces)? Spoiler Seems there must be a simple command for this, like getWeaponObject (or similar)? Share this post Link to post Share on other sites
.kju 3240 Posted May 14, 2021 in arma, weapons are no separate entities 1 Share this post Link to post Share on other sites
madrussian 347 Posted May 14, 2021 11 minutes ago, .kju said: in arma, weapons are no separate entities Thanks for the response. Respectfully, again lineIntersectsSurfaces seems to consider man and his weapon as separate. Also, when a unit dies (and thus drops his weapon), his weapon is definitely separated then (perhaps technically contained in weapon holder or similar). Sounds like for living unit holding a weapon though, maybe there is no direct command to get at this weapon "object" that is apparent to lineIntersectsSurfaces? Share this post Link to post Share on other sites
.kju 3240 Posted May 14, 2021 weapons/items sit in a weaponholder when not with an unit 1 Share this post Link to post Share on other sites
pierremgi 4739 Posted May 14, 2021 CursorObject returns the primaryWeapon of an unit, not the unit when you point at it. That's not the case for other loadout as backpack, headgear or else. getModelInfo cursorObject (pointed at primary weapon of a standing "B_Soldier_A_F"): ["mx_f.p3d","a3\weapons_f\rifles\mx\mx_f.p3d",true] getModelInfo cursorObject (anywhere else on unit) ["b_soldier_01.p3d","a3\characters_f\blufor\b_soldier_01.p3d",true] Now, 🥁 drum roll, deleteVehicle cursorObject on primary weapon // nothing occurs on unit // bye! There is no object (NOID), just string for primary weapon, which allows you a bunch of possibilities with related weapon commands. 2 Share this post Link to post Share on other sites
madrussian 347 Posted May 15, 2021 Good points guys, all makes sense now. 🙂 Share this post Link to post Share on other sites