deniodan 15 Posted February 7, 2014 Hey guys! My question is more for the acquisition of knowledge rather than a problem in itself. I was using this code found here to "kill" the trees using his ID's. (getPos this nearestObject 314) setDamage 1; For that, I put this command in a Game logic obj ini and it worked pretty well. But for each ID I have to copy the whole command. I was wondering if there is a way (and probably have) to make a collection of ID's in a single code. Something like this: (getPos this nearestObject [314, 315, 316, 317]) setDamage 1; I've tryed some things but always got a error instead. Someone could enlight how to do such thing? I'm pretty new with this script thing. Thanks you guys! Share this post Link to post Share on other sites
tonic-_- 53 Posted February 7, 2014 Maybe something like this? { (getPos this nearestObject _x) setDamage 1; } foreach [314,315,,316,317]; Share this post Link to post Share on other sites
deniodan 15 Posted February 8, 2014 Thank you Mr. Tonic! Works just fine! So simple!! I have to study more! Share this post Link to post Share on other sites