Jump to content
Sign in to follow this  
Florklin

Detect if a unit is using NVG

Recommended Posts

The original night vision is crystal clear, and i want it a bit... dirtier. I achieved this with a subtle filmgrain and radialblur effect. The problem is that i don´t know how to disable the effect when you don´t wear the nvg, and it looks horrible when you see the world like through an old TV. I know how to detect if the player has nvg or not, but not if he´s using it.

Please, excuse my ignorance, i´ve searched, i´ve read a lot of threads... but i´m stuck.

I´d appreciate any help.

Share this post


Link to post
Share on other sites

Unfortunately, I don't believe there is a way to do this outside of VBS2.

Share this post


Link to post
Share on other sites

Maybe i can force the player to wear nvg with a loop, but that´s a nasty trick.

Share this post


Link to post
Share on other sites

ppEffectDestroy works fine, but i don´t know how to detect if the nvg are on or off to create or destroy the effect.

Share this post


Link to post
Share on other sites

The new currentVisionMode does not give me true or false, but the, well, vision mode. Try this in a true trigger:

nul = [] spawn {while {true} do {sleep 0.3; hint str currentVisionMode player}}

Maybe the command is updated with the betas? I don't know.

Share this post


Link to post
Share on other sites

Maybe I was looking at it wrong it returned the values of 0 and 1 when wearing the nvg's.

Share this post


Link to post
Share on other sites
It gave me 1 when nvg was activated, 0 on normal vision (and I expect 2 on TI if I had that).

It does indeed. 0 = normal, 1 = NVG and 2 = TI (WH or BH). Works as a vehicle gunner as well.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×