ChrisFox 0 Posted May 11, 2007 Hello, I was wondering how I can make buildings (in let's say Corazol) be destroyed without destroying them yourself (like 'wrecked' buildings). I want to let Corazol look like a warzone city, and therefore I need to have half of the buildings destroyed already at the start of the misison. How can I get that done? THnx! Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted May 11, 2007 set the object dammage to 1 in a trigger or script. Share this post Link to post Share on other sites
ChrisFox 0 Posted May 11, 2007 Euhm...ok and how do I do that .. ? (note I'm a noob in scripting / editing) Share this post Link to post Share on other sites
ChrisFox 0 Posted May 11, 2007 I know u can use <unitname> setDamage 1 in the Init field of objects, but for buildings you don't have such a field so....how's that done with triggers/scripts ?? Â Thnx Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted May 11, 2007 In the editor you have a button with "Show Ids" on it. If you click that lots of numbers will show up on the map. Use the numbers in conjunction with the nearestobject command instead of unitname. You could place a gamelogic in corazol and name it cora1. Then put some of the id numbers within 50m of the gamelogic into the init field of the gamelogic or into a trigger/script. fx: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">((getPos cora1) nearestObject 123456) setDamage 1; You could also try something like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{_x setDamage 1} forEach (nearestObjects [cora1, ["house"], 70]; The latter might destroy all the houses in a 70 meter radius around the gamelogic... Share this post Link to post Share on other sites
ChrisFox 0 Posted May 12, 2007 THnx alot. The first one works for sure Pitty though BI made the ruins so flat (with hardly any walls left), but whatever :P Share this post Link to post Share on other sites