Jump to content
Sign in to follow this  
D3VL3R

take off NV Goggles?

Recommended Posts

Hi,

I have NPC soldier on OPFOR side, he is sitting in front of camp fire and he has Night Vision on eyes, so it looks unreal. Is there any way, how to take off NV Goggles from eyes of unit and not remove it from head?

unit action ["nvGogglesOff", <anything>] is bad solution...

Thanks!

Edited by D3VL3R

Share this post


Link to post
Share on other sites

What's wrong with nvGogglesOff? He puts them right back on afterwards?

Share this post


Link to post
Share on other sites

For example:

Opfor Unit name: Soldier

Init: Soldier action ["nvGogglesOff", Soldier];

nothing happened, same for trigger...

Share this post


Link to post
Share on other sites

Oh, ok. Haven't tried it myself.

Wiki says: "AI controlled units will automatically put on and take off goggles depending on daylight." So they probably overwrite your action instantly.

What if you use disableAI before nvGogglesOff?

Share this post


Link to post
Share on other sites

yeah, good idea, I can try it...

What category I have to try? ANIM?

Edited by D3VL3R

Share this post


Link to post
Share on other sites

DisableAI have not effect :(

Any other idea?

Share this post


Link to post
Share on other sites
No idea other than removing the NVG, sorry. :(

You could remove the NVG while your soldier is inside a very small trigger around the fireplace and add the NVGs as soon as he leaves this area, I suppose.

#edit: tried, it work's fine:

small round trigger grouped with the unit

settings: vehicle repeatedly present

condition: this;

on act: NameOfYourOPFORUnit unlinkitem "NVGoggles_OPFOR";

on deact: NameOfYourOPFORUnit linkitem "NVGoggles_OPFOR";/

That way the guy won't wear his NVGs as long as he's inside the trigger and alive. As soon as he leaves to trigger or dies, he'll have the NVGs back.

Edited by Pergor

Share this post


Link to post
Share on other sites

Yeah, but I want take off NV Goggles only from eyes of unit, but not from head...

Same situation, when player press "N", when is NV active, then is NV on eyes, deactive, NV is on head. But I dont know, how it simulate on NPC

Share this post


Link to post
Share on other sites

I may be wrong and there might be some complex workaround, but it looks like the AI activating the NVG is hardcoded in the engine.

Create a repeating script for nvGogglesOff so AI doesn't have the time to put the goggles back on? :D

Share this post


Link to post
Share on other sites

You can try

{
       if (side _x == west) then {
               _x unassignItem "NVGoggles";
               _x removeItem "NVGoggles";
       };

} foreach allunits;

In the mission init.sqf add the above which is set up for NATO units but you can change "(side _x == west)" to the faction you wish to have no NVGs AT ALL then change "_x unassignItem "NVGoggles";" and "_x removeItem "NVGoggles";" to the classname of nvgs for that faction. Each faction uses different classname for nvgs.

Share this post


Link to post
Share on other sites

I know all this information, but my problem is, how have NV on head and no on eyes at night...

Share this post


Link to post
Share on other sites
Yeah, but I want take off NV Goggles only from eyes of unit, but not from head...

Ah, okay, I get you now.

But, let's be honest: Isn't that merely an aesthetical problem? It's good that you created the ticket and all, but I suppose no player would be angry if the NVGs weren't on the head.

Share this post


Link to post
Share on other sites

You have right, it is about theory...

Why you can command to force shoot and there is no command for this? Logic? I am rigorous on every detail. :P

Share this post


Link to post
Share on other sites
You have right, it is about theory...

Why you can command to force shoot and there is no command for this? Logic? I am rigorous on every detail. :P

Academic interest is the purest of all urges. ;)

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  

×