rtek 10 Posted April 13, 2014 This is the second time in the past month that Bohemia has changed the ID's. I'm getting pissed because I have to go back and change all the triggers in my missions that rely on a building ID. Like ID #1062851 is now 1062852, and 1063914 is now 1063932. on a trigger with the Condition set to ((getDammage (position logica1 nearestObject 1062852)) == 1) && ((getDammage (position logica1 nearestObject 1063932)) == 1); for a building destruction, is there any way to get around having to use ID's? Instead use a marker maybe? I've tried to use an object, but objects don't always destroy, unless I'm doing it wrong. Anyways, I'm tired of Bohemia changing the ID's, and wondering if there's a more reliable way to set a trigger to fire if a specific building is destroyed. Share this post Link to post Share on other sites
cobra4v320 27 Posted April 13, 2014 (edited) Dont use IDs problems solved. Get the position of the object and use its classname instead of ID. _someBuilding = [position numbers] nearestObject ["Land_nameHere",10]; _someBuilding addEventHandler [ "handleDamage", { if ((_this select 4) == "demoCharge_remote_ammo" or (_this select 4) == "satchelCharge_remote_ammo") then {(_this select 0) setDamage 1}; } ]; The code I posted above might be off Im just guessing. Edited April 13, 2014 by cobra4v320 Share this post Link to post Share on other sites
Planetar 19 Posted April 13, 2014 Yeah, changing IDs are a pain. cobras suggestion looks good, but you can also try this. It is a bit of ghetto solution but has worked, most of the time, in my missions. Make a trigger to cover the area of your building. Name the trigger trig1. In fact I am not sure if it has to even cover the building or not, but never mind that. Check the tooltip hint for the building you want to demolish. In this example "Military Cargo tower, Green" Then go to config viewer in editor. Looks like a gear symbol. Inside it find CfgVehicles. Truckload of stuff in there, but try to find the object that somewhat matches the tooltip description. In this case it was Land_Cargo_Tower_V2_F. Then check the "parents" fields at the viewer. It should show list of object classes the building inherits. Like "House", "House_F", "Cargo_Tower_base_F". Pick the last in the list and put it to trigger. As I was not sure which cargo tower it is precisely, I just used the "base" version which should cover them all. Example: damage (nearestObject [getposATL trig1,"Cargo_Tower_base_F"]) >= 1 That works most of time. If you use too generic class, like "House", your trigger might fire if you demolish wrong building, so experiment and see what works. Share this post Link to post Share on other sites
cobra4v320 27 Posted April 14, 2014 Under the debug console go under watch and type in: typeOf cursorTarget Aim at the building in question then go back to the debug console. In quotations should be your building classname. Doesnt work with all map objects. ---------- Post added at 01:15 ---------- Previous post was at 01:13 ---------- You can also use the nearestBuilding command. Share this post Link to post Share on other sites
Beerkan 71 Posted April 14, 2014 This also works, and you don't need to name the trigger damage (nearestObject [getposATL thisTrigger,"Land_Radar_Small_F"]) >= 1; For a list of Objects names see Arma_3_CfgVehicles Share this post Link to post Share on other sites
rtek 10 Posted April 14, 2014 Hey thanks. Ill try those out tonight. Im sick having to change ID's so these alt methods will come in handy. Thanks again. Share this post Link to post Share on other sites