Undeceived 392 Posted May 12, 2014 Hello guys, I'm trying to remove a certain cap from the civilians at mission start. This cap is reserved for a special occasion in the campaign I'm creating, this is why no one must wear it. :p And there are dozens of civilians in my missions - this is why I simply can't edit everyone of them. To do this I want to check at the mission's start if someone is wearing this cap: H_Cap_blk_CMMG It seems I'm still a noob when it comes to conditions or code which goes further than unit1 dofire unit2; or something like that... Can you please help me with that? I want something like this in my init.sqf: {check if someone is wearing "H_Cap_blk_CMMG"} for all civilian units; removeHeadGear from these units; :) This may sound a bit stupid, but I really have no idea how to "convert" it into sqf... Can anyone help me? Thanks a lot!! :) Share this post Link to post Share on other sites
Tajin 349 Posted May 12, 2014 (edited) Here you go: { if (side _x == civilian) then { if (headgear _x == "H_Cap_blk_CMMG") then { removeHeadgear _x; }; }; } forEach allUnits; Edited May 13, 2014 by Tajin missing "then" Share this post Link to post Share on other sites
Undeceived 392 Posted May 12, 2014 Here you go: Wow, it looks so simple! :D Thanks a lot, Tajin, it works perfectly! Much appreciated! :) There was a "then" missing - I added it: { if (side _x == civilian) then { if (headgear _x == "H_Cap_blk_CMMG") then { removeHeadgear _x; }; }; } forEach allUnits; Share this post Link to post Share on other sites
Tajin 349 Posted May 13, 2014 oh, right. I make that mistake sometimes.... too much js. ;) Share this post Link to post Share on other sites