schadler17 36 Posted October 3, 2015 Basically, I want a medical class to spawn with 10 First Aid Kits and a Medikit. Only I don't want my units init code to look uglier than shit with _unit addItem "firstaidkit" 10 times. I'm OCD as hell and everything has to look perfect for me or it messes with me lol. Is there any way to add multiple items of the same type in a neater fashion? Kinda like addMagazines ["x", 10] or something neater? Share this post Link to post Share on other sites
schadler17 36 Posted October 3, 2015 Fixed using forEach. I always find a solution right when I post. -.- I should start clicking Preview Post beforehand, think for 10 seconds, then decide to post or not lol. EDIT: Even better solution below. (unitbackpack _unit) addItemCargoGlobal ["FirstAidKit", 15]; Share this post Link to post Share on other sites
R3vo 2654 Posted October 3, 2015 for "_i" from 1 to 10 do { this addItems "itemClassName"}; Share this post Link to post Share on other sites
R3vo 2654 Posted October 3, 2015 for "_i" from 1 to 10 do { this addItems "itemClassName"}; Share this post Link to post Share on other sites
R3vo 2654 Posted October 3, 2015 for "_i" from 1 to 10 do { this addItems "itemClassName"}; Sorry for triple post, no clue what went wrong :huh: Share this post Link to post Share on other sites