ziiip 1 Posted December 12, 2009 Hi guys, can someone tell me how to set the damage value of buildings in the mission editor? I wanna make a "ghost town" with all the houses partially or completely destroyed right from the start. Thanks! Share this post Link to post Share on other sites
Deadfast 43 Posted December 12, 2009 Level a town: Place a logic in the middle of the town. Put this into its init field: {_x setDamage 1} forEach (nearestObjects [this, ["House"], 100]); (Where 100 is the destruction radius) Share this post Link to post Share on other sites
ziiip 1 Posted July 29, 2010 Can I do the same to fences? Loosk kinda funny that all houses have been dozered but every fence is standing. Share this post Link to post Share on other sites
rübe 127 Posted July 29, 2010 Can I do the same to fences? Loosk kinda funny that all houses have been dozered but every fence is standing. Sure. Do you see that array with "House" in it? {_x setDamage 1} forEach (nearestObjects [this, ["House"], 100]); Feel free to put as many classes in there as you like. Fences, walls,.. just look it up in the CfgVehicles. Share this post Link to post Share on other sites
ziiip 1 Posted July 29, 2010 I checked the armaholic unit library but didnt find the fence, only the wooded gates. :confused: Share this post Link to post Share on other sites
rübe 127 Posted July 29, 2010 (edited) I checked the armaholic unit library but didnt find the fence, only the wooded gates. :confused: Please people read. You are supposed to look for CfgVehicles and not some armaholic unit library... (where did that come from?!). There you will find the class names you're looking for, though I suggest you simply use "Building", which includes Houses and Fences and many other stuff. And really, is it too much to ask, that you look up the command you're using by yourself? All the information needed is there. Just RTFM. A list of ClassName types (Tanks eg) can be found in CfgVehicles It's right there... nearestObjects. always these lazy bones in here... :rolleyes: Edited July 29, 2010 by ruebe Share this post Link to post Share on other sites
ziiip 1 Posted July 29, 2010 http://www.armatechsquad.com/ArmA2Class/A2/Buildings/#document This is what I thoroughly checked. ;) Thanks though.:D Btw I've jsut started using these cool scripting commands so forgive me if my knowledge is poor. Share this post Link to post Share on other sites
kylania 568 Posted July 29, 2010 It's all good ziip, the stuff you're looking for isn't exactly as easy to find as changing weapons on a unit or something. :) Plus biki's seach tool is worthless, so even if you know exactly what you're looking for you can't find it sometimes. Share this post Link to post Share on other sites
Evil_Echo 11 Posted July 30, 2010 Can I do the same to fences? Loosk kinda funny that all houses have been dozered but every fence is standing. _objects = (nearestObjects[_pos, [], _blast_radius]) - (nearestObjects[_pos, ["All"], _blast_radius]); { _x setDamage 1; } forEach _objects; Share this post Link to post Share on other sites
celery 8 Posted July 30, 2010 Replacing "Houses" or "All" with [] will make it include every imaginable object, not just the ones with classnames. Share this post Link to post Share on other sites
Evil_Echo 11 Posted July 30, 2010 The code finds the objects with no class - like trees and fences. It works exactly as intended. Share this post Link to post Share on other sites
ziiip 1 Posted July 30, 2010 Your help is deeply appreciated guys. :) Share this post Link to post Share on other sites