Jump to content
Sign in to follow this  
Stefano81

Hello everyone i'm new...can someone help me?

Recommended Posts

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

Moving to missione editing smile.gif

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×