Stefano81 0 Posted August 24, 2002 Hello whoever is reading this is my first post...I just started using the editor and got stuck in a problem at the end of my mission...I want to make a trigger that makes the objective1 complete when a certain building is destroyed...I thought I could do that with the getDammage command but I can't cause I can't name the building(it's not a unit,it was already in the Nogova map)...i tried putting the ID number of the house but didn't work...I looked into the forums and editing guides but nothing helped me...please if someone "saint" enough could help me out to make this trigger I'd be very grateful... forgive my poor english,Ste Share this post Link to post Share on other sites
Guest Posted August 24, 2002 Moving to missione editing Welcome to the forums! To answer your question briefly: you were on the right track. In the mission editor you should select "Show IDs". Then zoom in on the building you want to look at and you will see a number written on it, say for instance 70079. To get the damage of the building you then have the command: getDammage (object (70079) ) Share this post Link to post Share on other sites
Chris Death 0 Posted August 24, 2002 One more: Place a trigger with a range so that the building is inside the trigger area. Then group the trigger with the building (press F2 and drag a line). Now if you dbl-click the trigger again, you will see, that the trigger-activation changed from NONE to STATIC-OBJECT Now just use the NOT PRESENT option of that trigger, and it will become activated, once the building is destroyed. ~S~ CD Share this post Link to post Share on other sites
joltan 0 Posted August 25, 2002 another way... use the nearestObject command: place a gamelogic near the object you want to check and put 'this exec "checkdammage.sqs" in the init line. The script checks every second if the next object (at init) to the position of the gamelogic has been destroyed: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_glogic=_this _glogicpos=getpos _glogic _glogic setpos [1,1,0] targetstatus="alive"; targetobject=nearestObject [_glogicpos select 0,_glogicpos select 1,_glogicpos select 2] #loop ~1 ?((GetDammage targetobject)<1):goto "loop" targetstatus="destroyed"<span id='postcolor'> Share this post Link to post Share on other sites