chrisbaker1981 25 Posted May 10, 2021 Anyone know how to deactivate thermals and night vision for the special ops viper helmet on a player. H_HelmetO_ViperSP_ghex_F is its name. Ive looked through the wiki but can only find deactivate thermals and night vision for vehicles. I have found a way of turning night vision off with a trigger but then the player can just turn it back on again, wonder if its possible to make the trigger more final so the player cant just turn it back on again? With a trigger I want to force the player who at this point will be wearing the special purpose viper hemlet, to not use night vision or thermals... Basically deactivate the features but still be able to wear the helmet for the armour and look... Share this post Link to post Share on other sites
beno_83au 1369 Posted May 10, 2021 Try: https://community.bistudio.com/wiki/currentVisionMode nul = [] spawn { while {true} do { waitUntil {sleep 0.1; currentVisionMode player != 0}; //code }; }; Short of being able to disable it (maybe with a config edit?) that could solve the issue. Share this post Link to post Share on other sites
pierremgi 4889 Posted May 10, 2021 0 = [] spawn { waitUntil {!isNull (findDisplay 46)}; findDisplay 46 displayAddEventHandler ["KeyDown", " _status = false; if (_this #1 in actionKeys 'nightVision' && headGear player == 'H_HelmetO_ViperSP_ghex_F') then {_status = TRUE}; _status "]; }; Share this post Link to post Share on other sites
chrisbaker1981 25 Posted May 10, 2021 3 hours ago, beno_83au said: Try: https://community.bistudio.com/wiki/currentVisionMode nul = [] spawn { while {true} do { waitUntil {sleep 0.1; currentVisionMode player != 0}; //code }; }; Short of being able to disable it (maybe with a config edit?) that could solve the issue. This doesnt work as a copy paste, you probably didnt intend it to be 🙂 sorry i have no idea what im doing 🙂 Share this post Link to post Share on other sites
chrisbaker1981 25 Posted May 10, 2021 23 minutes ago, pierremgi said: 0 = [] spawn { waitUntil {!isNull (findDisplay 46)}; findDisplay 46 displayAddEventHandler ["KeyDown", " _status = false; if (_this #1 in actionKeys 'nightVision' && headGear player == 'H_HelmetO_ViperSP_ghex_F') then {_status = TRUE}; _status "]; }; This is interesting, is this basically locking the action key to put night vision on? I was wondering if that was possible lol i was thinking of a command to deactivate the n on your keyboard with a trigger... Problem is, the player will likely have nightvision on when the trigger is activated, so this script will lock the night vision on 🙂 oh wait a minute, i can have a seperate trigger for nightvision off, which i had working, and then this trigger to lock the key so you cant press it again... yes im gonna try that and let you know Share this post Link to post Share on other sites
chrisbaker1981 25 Posted May 10, 2021 ok works thanks everyone... Im sure i could try and combine into one trigger but anyhow.. 1 trigger with player action ["nvGogglesOff", player]; and the other with MGIs code which locks the key function to reactivate the night vision Thanks All Share this post Link to post Share on other sites