Bnae 1427 Posted January 6, 2016 Seen similiar questions and now i'm asking it again. example_1 player hasWeapon "arifle_Katiba_C_F"; So if player takes Katiba this will run. No matter if from ground or from backpack. example_2 "30Rnd_65x39_caseless_mag_Tracer" in magazines player Same thing with magazine. example_3 "ItemMap" in assigneditems player Same thing with map. But how about balaclava / face cover? Cannot find any topic or Biki page about these things. If anyone knows there is, please link it. And if there is not, could somebody share this info. Share this post Link to post Share on other sites
davidoss 528 Posted January 6, 2016 _goggles = goggles player; if (_goggles == "classname") then {true}; Share this post Link to post Share on other sites
whiztler 128 Posted January 6, 2016 Try this: https://community.bistudio.com/wiki/goggles Share this post Link to post Share on other sites
Bnae 1427 Posted January 6, 2016 _goggles = goggles player; if (_goggles == "classname") then {true}; Okay this is working. But it works only once when that script is activated. How do i make that constantly activated? Share this post Link to post Share on other sites
harmdhast 130 Posted January 6, 2016 Okay this is working. But it works only once when that script is activated. How do i make that constantly activated? What do you mean by "constantly activated" ? constantly checking ? Share this post Link to post Share on other sites
R3vo 2535 Posted January 6, 2016 But it works only once when that script is activated. How do i make that constantly activated? waitUntil {sleep 1; _goggles == "classname"}; A while loop would also work. Share this post Link to post Share on other sites
Bnae 1427 Posted January 6, 2016 What do you mean by "constantly activated" ? constantly checking ? Yeah constantly checking. Share this post Link to post Share on other sites
Bnae 1427 Posted January 6, 2016 waitUntil {sleep 1; _goggles == "classname"}; A while loop would also work. This only added 1sec delay. Why there is no "when" command? :huh: Share this post Link to post Share on other sites
Belbo 451 Posted January 6, 2016 This only added 1sec delay. Why there is no "when" command? :huh: Because that's unfortunately not how sqf works. ;) You could try something like this: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Takebut that only works if the item is taken from a container (and I don't know if groundweaponholder is a container in this regard). Share this post Link to post Share on other sites
R3vo 2535 Posted January 6, 2016 When player hasWeapon "xxxxx"; ? How would that work, same like waitUntil, it would constantly check if the condition is met. You can remove the sleep from the waitUntil, but keep in mind that it will then run on each frame. Share this post Link to post Share on other sites
code34 222 Posted January 7, 2016 Why there is no "when" command? :huh: In which langage do you find this command ? Share this post Link to post Share on other sites
Bnae 1427 Posted January 7, 2016 When player hasWeapon "xxxxx"; ? How would that work, same like waitUntil, it would constantly check if the condition is met. You can remove the sleep from the waitUntil, but keep in mind that it will then run on each frame. It took waay too long for me to figure this out. Thanks davidoss and R3vo for quick and simple answers! waitUntil{ sleep 1; _goggles = goggles player; _goggles == "G_Diving"; }; Share this post Link to post Share on other sites