_-xXShArK_OGXx-_ 6 Posted February 11, 2021 Holy Moly, a plane has been shoot down and we need to recover the flight recorder!!,, so I made a trigger with the condition : ({_x isKindOf "rhs_flightrecorder"} count thisList) > 0 and it works if I spawn a rhs_flightrecorder in the area, but if I pick it up and go in the trigger and drop it nothing happens. I also tried a box using: {_x =="rhs_flightrecorder"} count ItemCargo FLR_box >0 how do i detect the flight recorder? thx. Share this post Link to post Share on other sites
beno_83au 1369 Posted February 12, 2021 When you carry it into the area and drop it onto the ground, and this goes from anything being moved from an inventory to the ground (at least, I can't think of anything that wouldn't do this), the item gets placed into a "GroundWeaponHolder" object. You can test this yourself by pointing your cursor/weapon at the object you just dropped, bring up the debug menu, and put this into one of the "Watch" boxes: typeOf cursorObject So the "GroundWeaponHolder" acts as a container for the object. So you need to search for any "GroundWeaponHolder" that are in the trigger, then check to see if there's a "rhs_flightrecorder" in their inventory. BUT, it seems like triggers don't get triggered by a "GroundWeaponHolder". So you need to get a bit creative: _radius = selectMax ((triggerArea thisTrigger) select [0,2]); _holders = (nearestObjects [getPos thisTrigger,["GroundWeaponHolder"],_radius]) select {_x inArea thisTrigger}; ({(((getItemCargo _x) select 0) select 0) == "rhs_item_flightrecorder"} count _holders) > 0 Put that into the trigger's "Condition" field and it should detect when someone has placed a flight recorder onto the ground from their inventory. 5 Share this post Link to post Share on other sites
_-xXShArK_OGXx-_ 6 Posted February 13, 2021 Awsome!!!! just tested it out and it works like a charm 🙂 Maby we will know who shoot down the plane after all 😉 Share this post Link to post Share on other sites
_-xXShArK_OGXx-_ 6 Posted February 13, 2021 but there seems to be something i'm not getting, how do i detect it in a box or backpack? i tried: ({_x == "rhs_flightrecorder"} count ItemCargo box_1) > 0 as a condition on a trigger, but it does not trigger when i put it in. if i use >> hint str getItemCargo box_1; i get >> [["rhs_item_flightrecorder"],[1]] Share this post Link to post Share on other sites
_-xXShArK_OGXx-_ 6 Posted February 14, 2021 On 2/13/2021 at 3:22 AM, _-xXShArK_OGXx-_ said: but there seems to be something i'm not getting, how do i detect it in a box or backpack? i tried: ({_x == "rhs_flightrecorder"} count ItemCargo box_1) > 0 as a condition on a trigger, but it does not trigger when i put it in. if i use >> hint str getItemCargo box_1; i get >> [["rhs_item_flightrecorder"],[1]] LOL!!! looking for the wrong class name is not the way to make it work 😉 Got it now,, thx ({_x =="rhs_item_flightrecorder"} count ItemCargo box_1) > 0 Solved 1 Share this post Link to post Share on other sites
beno_83au 1369 Posted February 14, 2021 7 hours ago, _-xXShArK_OGXx-_ said: LOL!!! looking for the wrong class name is not the way to make it work 😉 Haha yes, caught me out for a little bit too 😁 1 Share this post Link to post Share on other sites